diff --git a/build/Build.cs b/build/Build.cs index 2263918..6559cc6 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -5,6 +5,7 @@ using System.Linq; using JetBrains.Annotations; using Nuke.Common; +using Nuke.Common.CI; using Nuke.Common.Execution; using Nuke.Common.IO; using Nuke.Common.ProjectModel; @@ -16,9 +17,10 @@ using Serilog; using static Nuke.Common.IO.FileSystemTasks; using static Nuke.Common.Tools.DotNet.DotNetTasks; +using static Nuke.Common.Tools.SignTool.SignToolTasks; -[CheckBuildProjectConfigurations] [UnsetVisualStudioEnvironmentVariables] +[VerbosityMapping(typeof(DotNetVerbosity), Verbose = nameof(DotNetVerbosity.diagnostic))] class Build : NukeBuild { /// Support plugins are available for: @@ -40,9 +42,9 @@ class Build : NukeBuild Name = "OCTOVERSION_CurrentBranch")] readonly string BranchName; - [OctoVersion(UpdateBuildNumber = true, BranchParameter = nameof(BranchName), - AutoDetectBranchParameter = nameof(AutoDetectBranch), Framework = "net6.0")] - readonly OctoVersionInfo OctoVersionInfo; + [OctoVersion(BranchMember = nameof(BranchName), + AutoDetectBranchMember = nameof(AutoDetectBranch), Framework = "net8.0")] + public OctoVersionInfo OctoVersionInfo; AbsolutePath SourceDirectory => RootDirectory / "source"; AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts"; @@ -145,7 +147,7 @@ class Build : NukeBuild .SetOutputDirectory(ArtifactsDirectory) .EnableNoBuild() .DisableIncludeSymbols() - .SetVerbosity(DotNetVerbosity.Normal) + .SetVerbosity(DotNetVerbosity.normal) ); } finally diff --git a/build/_build.csproj b/build/_build.csproj index d1d9676..d99dc34 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -2,18 +2,28 @@ Exe - net6.0 + net8.0 CS0649;CS0169 .. .. 1 + true + + + + + - - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + - + \ No newline at end of file diff --git a/global.json b/global.json index 24b2f5b..f5071f0 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.300", + "version": "8.0.407", "rollForward": "latestFeature" } } \ No newline at end of file diff --git a/source/CommandLine/CommandLine.csproj b/source/CommandLine/CommandLine.csproj index 0d3bb15..725cc65 100644 --- a/source/CommandLine/CommandLine.csproj +++ b/source/CommandLine/CommandLine.csproj @@ -1,8 +1,7 @@ - net462;netstandard2.0;netcoreapp3.1;net6.0 - netstandard2.0;netcoreapp3.1;net6.0 + net8.0 true embedded Octopus.CommandLine @@ -18,7 +17,7 @@ Apache-2.0 Octopus Deploy Pty. Ltd. - Copyright © Octopus Deploy 2022 + Copyright © Octopus Deploy 2025 https://github.com/OctopusDeploy/CommandLine https://github.com/OctopusDeploy/CommandLine The command line parsing library used by many of Octopus apps. Supports global and command specific help, json output, auto-complete and more. @@ -36,11 +35,11 @@ - - + + - + \ No newline at end of file diff --git a/source/CommandLine/Octopus.CommandLine.nuspec b/source/CommandLine/Octopus.CommandLine.nuspec index 7670eba..0eecb73 100644 --- a/source/CommandLine/Octopus.CommandLine.nuspec +++ b/source/CommandLine/Octopus.CommandLine.nuspec @@ -4,35 +4,23 @@ Octopus.CommandLine $version$ - Octopus Deploy Pty. Ltd. + Octopus Deploy false Apache-2.0 https://licenses.nuget.org/Apache-2.0 images\icon.png https://github.com/OctopusDeploy/CommandLine The command line parsing library used by many of Octopus apps. Supports global and command specific help, json output, auto-complete and more. - Copyright © Octopus Deploy 2022 + Octopus Deploy Pty Ltd - - - - - - - - - - - + + - - - - + \ No newline at end of file diff --git a/source/CommandLine/Plumbing/ExecutionEnvironment.cs b/source/CommandLine/Plumbing/ExecutionEnvironment.cs index 378b0e8..ee86f31 100644 --- a/source/CommandLine/Plumbing/ExecutionEnvironment.cs +++ b/source/CommandLine/Plumbing/ExecutionEnvironment.cs @@ -9,13 +9,6 @@ namespace Octopus.CommandLine.Plumbing; [SuppressMessage("ReSharper", "PC003")] // suppresses a warning that libc!uname is unavailable in UWP static class ExecutionEnvironment { - /// - /// If/When we try executing this on another runtime we can 'tweak' this logic. - /// The reccomended way to determine at runtime if executing within the mono framework - /// http://www.mono-project.com/docs/gui/winforms/porting-winforms-applications/#runtime-conditionals - /// - public static readonly bool IsRunningOnMono = Type.GetType("Mono.Runtime") != null; - /// /// Based on some internal methods used my mono itself /// https://github.com/mono/mono/blob/master/mcs/class/corlib/System/Environment.cs diff --git a/source/CommandLine/ShellCompletion/PowershellCompletionInstaller.cs b/source/CommandLine/ShellCompletion/PowershellCompletionInstaller.cs index 60f6f64..a359be7 100644 --- a/source/CommandLine/ShellCompletion/PowershellCompletionInstaller.cs +++ b/source/CommandLine/ShellCompletion/PowershellCompletionInstaller.cs @@ -35,7 +35,7 @@ public PowershellCompletionInstaller(ICommandOutputProvider commandOutputProvide public override void Install(bool dryRun) { - if (ExecutionEnvironment.IsRunningOnNix || ExecutionEnvironment.IsRunningOnMac || ExecutionEnvironment.IsRunningOnMono) + if (ExecutionEnvironment.IsRunningOnNix || ExecutionEnvironment.IsRunningOnMac) throw new CommandException("Unable to install for powershell on non-windows platforms. Please use --shell=pwsh instead."); base.Install(dryRun); } diff --git a/source/Tests/Tests.csproj b/source/Tests/Tests.csproj index bd9d0a1..8662870 100644 --- a/source/Tests/Tests.csproj +++ b/source/Tests/Tests.csproj @@ -1,24 +1,23 @@ - net462;netstandard2.0;netcoreapp3.1;net6.0 - netstandard2.0;netcoreapp3.1;net6.0 + net8.0 latest - - - - - - - - + + + + + + + + - + \ No newline at end of file