From 6e398412ddb41f228fc3bed01917c9be8fd0bba1 Mon Sep 17 00:00:00 2001 From: Flash0ver <38893694+Flash0ver@users.noreply.github.com> Date: Tue, 28 Nov 2023 00:22:11 +0100 Subject: [PATCH] refactor: reorder Build properties --- src/build/FlashOWare.Tool.Build/Build.cs | 28 ++++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/build/FlashOWare.Tool.Build/Build.cs b/src/build/FlashOWare.Tool.Build/Build.cs index 15d87ad..ed20a81 100644 --- a/src/build/FlashOWare.Tool.Build/Build.cs +++ b/src/build/FlashOWare.Tool.Build/Build.cs @@ -35,10 +35,23 @@ class Build : NukeBuild { public static int Main() => Execute(x => x.Compile); + [GitRepository] readonly GitRepository GitRepository; + + [Solution] readonly Solution Solution; + [Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release; - [GitRepository] readonly GitRepository GitRepository; + [Parameter] readonly string VersionPrefix; + [Parameter] readonly string VersionSuffix; + + [Parameter] readonly string NuGetSource; + + [Parameter][Secret] readonly string NuGetApiKey; + + AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts"; + AbsolutePath TestResultsDirectory => ArtifactsDirectory / "test-results"; + AbsolutePath PackageDirectory => ArtifactsDirectory / "package"; Target Clean => _ => _ .Before(Restore) @@ -52,15 +65,6 @@ class Build : NukeBuild ArtifactsDirectory.DeleteDirectory(); }); - [Solution] readonly Solution Solution; - - [Parameter] readonly string VersionPrefix; - [Parameter] readonly string VersionSuffix; - - [Parameter] readonly string NuGetSource; - - [Parameter][Secret] readonly string NuGetApiKey; - Target Restore => _ => _ .Executes(() => { @@ -78,10 +82,6 @@ class Build : NukeBuild .SetNoRestore(FinishedTargets.Contains(Restore))); }); - AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts"; - AbsolutePath TestResultsDirectory => ArtifactsDirectory / "test-results"; - AbsolutePath PackageDirectory => ArtifactsDirectory / "package"; - Target Test => _ => _ .DependsOn(Compile) .Executes(() =>