Added .net 7 and .net 8 targets, Fixed bug in args parsing, Removed debug builds & drone config, Updated dependencies

Update .drone.yml, .gitignore, and 4 more files...
This commit is contained in:
2024-05-24 00:08:50 +02:00
parent 2bf8401f51
commit 20052c3fb4
6 changed files with 20 additions and 35 deletions
-18
View File
@@ -1,18 +0,0 @@
# Documentation:
# * https://docs.drone.io/quickstart/docker/
# * https://docs.drone.io/pipeline/docker/examples/languages/csharp/
# * https://discourse.drone.io/t/builds-are-stuck-in-pending-status/4437
kind: pipeline
type: docker
name: default
platform:
os: linux
arch: arm64
steps:
- name: test
image: mcr.microsoft.com/dotnet/sdk:6.0-alpine
commands:
- dotnet build "./NibblePoker.Application.ListComPort/NibblePoker.Application.ListComPort.csproj"
+3
View File
@@ -1,6 +1,8 @@
# IDEs
.idea/ .idea/
.vs/ .vs/
# Build Artifacts
Builds/any/ Builds/any/
Builds/arm*/ Builds/arm*/
Builds/x*/ Builds/x*/
@@ -25,4 +27,5 @@ Packages/
*.wixobj *.wixobj
*.wixpdb *.wixpdb
# Misc
notes.txt notes.txt
-4
View File
@@ -10,12 +10,8 @@ Global
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2E9CEFC2-66A8-4A03-84FB-C28F752F522C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2E9CEFC2-66A8-4A03-84FB-C28F752F522C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E9CEFC2-66A8-4A03-84FB-C28F752F522C}.Release|Any CPU.ActiveCfg = Release|Any CPU {2E9CEFC2-66A8-4A03-84FB-C28F752F522C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E9CEFC2-66A8-4A03-84FB-C28F752F522C}.Release|Any CPU.Build.0 = Release|Any CPU {2E9CEFC2-66A8-4A03-84FB-C28F752F522C}.Release|Any CPU.Build.0 = Release|Any CPU
{0E6E464E-8497-4752-8281-24A64E5E8A9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0E6E464E-8497-4752-8281-24A64E5E8A9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0E6E464E-8497-4752-8281-24A64E5E8A9D}.Release|Any CPU.ActiveCfg = Release|Any CPU {0E6E464E-8497-4752-8281-24A64E5E8A9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0E6E464E-8497-4752-8281-24A64E5E8A9D}.Release|Any CPU.Build.0 = Release|Any CPU {0E6E464E-8497-4752-8281-24A64E5E8A9D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
@@ -2,18 +2,20 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework> <TargetFrameworks>net6.0-windows;net7.0-windows;net8.0-windows</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<RootNamespace>NibblePoker.Application.ListComPort</RootNamespace> <RootNamespace>NibblePoker.Application.ListComPort</RootNamespace>
<AssemblyName>NibblePoker.Application.ListComPort</AssemblyName> <AssemblyName>NibblePoker.Application.ListComPort</AssemblyName>
<AssemblyVersion>3.0.0</AssemblyVersion> <AssemblyVersion>4.0.0</AssemblyVersion>
<FileVersion>3.0.0</FileVersion> <FileVersion>4.0.0</FileVersion>
<Version>3.0.0</Version> <Version>4.0.0</Version>
<NeutralLanguage>en-001</NeutralLanguage> <NeutralLanguage>en-001</NeutralLanguage>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<Authors>Herwin Bozet (@NibblePoker)</Authors> <Authors>Herwin Bozet (@NibblePoker)</Authors>
<ApplicationIcon>..\NibblePoker.Packaging.ListComPort\Icons\lscom-v2-text-01.ico</ApplicationIcon> <ApplicationIcon>..\NibblePoker.Packaging.ListComPort\Icons\lscom-v2-text-01.ico</ApplicationIcon>
<Configurations>Release</Configurations>
<Platforms>AnyCPU</Platforms>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@@ -21,7 +23,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="NibblePoker.Library.Arguments" Version="1.1.0" /> <PackageReference Include="NibblePoker.Library.Arguments" Version="2.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -7,7 +7,7 @@ using NibblePoker.Library.ComPortWatcher;
namespace NibblePoker.Application.ListComPort; namespace NibblePoker.Application.ListComPort;
internal static class Program { internal static class Program {
private const string Version = "3.0.0"; private const string Version = "4.0.0";
private static readonly Verb RootVerb = new Verb(""); private static readonly Verb RootVerb = new Verb("");
@@ -51,8 +51,8 @@ internal static class Program {
.RegisterOption(OptionShowNameRaw).RegisterOption(OptionNoPretty).RegisterOption(OptionSort) .RegisterOption(OptionShowNameRaw).RegisterOption(OptionNoPretty).RegisterOption(OptionSort)
.RegisterOption(OptionSortReverse).RegisterOption(OptionTabPadding).RegisterOption(OptionVersion) .RegisterOption(OptionSortReverse).RegisterOption(OptionTabPadding).RegisterOption(OptionVersion)
.RegisterOption(OptionVersionOnly), args); .RegisterOption(OptionVersionOnly), args);
} catch(ArgumentException) { } catch(Exceptions.ArgumentsException) {
Console.Error.Write("Failed to parse the launch arguments, default options will be used."); Console.Error.WriteLine("Failed to parse the launch arguments, default options will be used.");
_exitCode = ErrorCodes.ArgumentParsingFailure; _exitCode = ErrorCodes.ArgumentParsingFailure;
RootVerb.Clear(); RootVerb.Clear();
} }
@@ -85,7 +85,7 @@ internal static class Program {
Console.WriteLine("NibblePoker.Application.ListComPort (lscom) v" + Version); Console.WriteLine("NibblePoker.Application.ListComPort (lscom) v" + Version);
Console.WriteLine(""); Console.WriteLine("");
Console.WriteLine("Dependencies:"); Console.WriteLine("Dependencies:");
Console.WriteLine("├─> NibblePoker.Library.Arguments v1.1.0"); Console.WriteLine("├─> NibblePoker.Library.Arguments v2.0.0");
Console.WriteLine("├─> NibblePoker.Library.ComPortHelpers v" + Version); Console.WriteLine("├─> NibblePoker.Library.ComPortHelpers v" + Version);
Console.WriteLine("└─> NibblePoker.Library.RegistryHelpers v0.0.1"); Console.WriteLine("└─> NibblePoker.Library.RegistryHelpers v0.0.1");
Console.WriteLine(""); Console.WriteLine("");
@@ -94,7 +94,7 @@ internal static class Program {
Console.WriteLine("├─> https://github.com/aziascreations/DotNet-ListComPort"); Console.WriteLine("├─> https://github.com/aziascreations/DotNet-ListComPort");
Console.WriteLine("└─> https://github.com/aziascreations/DotNet-RegistryHelpers"); Console.WriteLine("└─> https://github.com/aziascreations/DotNet-RegistryHelpers");
Console.WriteLine(""); Console.WriteLine("");
Console.WriteLine("This software and all its libraries are licensed under the MIT license."); Console.WriteLine("This software and all its libraries are released in the public domain under the CC0-1.0 license.");
return ErrorCodes.NoError; return ErrorCodes.NoError;
} }
@@ -191,7 +191,7 @@ internal static class Program {
_exitCode = ErrorCodes.NoComPorts; _exitCode = ErrorCodes.NoComPorts;
} }
// Allows the program to be ran from a shortcut without closing the console instantly. // Allows the program to be run from a shortcut without closing the console instantly.
if(IsProgramRunDirectly()) { if(IsProgramRunDirectly()) {
Console.Write("\nPress any key to continue..."); Console.Write("\nPress any key to continue...");
Console.ReadKey(); Console.ReadKey();
@@ -200,7 +200,7 @@ internal static class Program {
return _exitCode; return _exitCode;
} }
// Imports "GetConsoleProcessList(...)" in order to know if the program was ran via a shortcut or CLI. // Imports "GetConsoleProcessList(...)" in order to know if the program was run via a shortcut or CLI.
// See: https://learn.microsoft.com/en-us/windows/console/getconsoleprocesslist // See: https://learn.microsoft.com/en-us/windows/console/getconsoleprocesslist
[System.Runtime.InteropServices.DllImport("kernel32.dll")] [System.Runtime.InteropServices.DllImport("kernel32.dll")]
private static extern int GetConsoleProcessList(int[] buffer, int size); private static extern int GetConsoleProcessList(int[] buffer, int size);
@@ -6,6 +6,8 @@
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<RootNamespace>NibblePoker.Library.ComPortWatcher</RootNamespace> <RootNamespace>NibblePoker.Library.ComPortWatcher</RootNamespace>
<AssemblyName>NibblePoker.Library.ComPortHelpers</AssemblyName> <AssemblyName>NibblePoker.Library.ComPortHelpers</AssemblyName>
<Configurations>Release</Configurations>
<Platforms>AnyCPU</Platforms>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>