Skip to content

Commit

Permalink
fix tag version
Browse files Browse the repository at this point in the history
  • Loading branch information
lahma committed Feb 15, 2024
1 parent 83a8c84 commit faf683e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ partial class Build : NukeBuild, ITest, IPack
{
public static int Main() => Execute<Build>(x => ((ICompile) x).Compile);

[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;

[GitRepository] readonly GitRepository GitRepository;

AbsolutePath SourceDirectory => RootDirectory / "src";
AbsolutePath TestDirectory => RootDirectory / "test";

string TagVersion => GitRepository.Tags.SingleOrDefault(x => "v".StartsWith(x))?[1..];
string TagVersion => GitRepository.Tags.SingleOrDefault(x => x.StartsWith('v'))?[1..];
bool IsTaggedBuild => !string.IsNullOrWhiteSpace(TagVersion);

string VersionSuffix;
Expand All @@ -45,7 +43,7 @@ protected override void OnBuildInitialized()
}

Log.Information("BUILD SETUP");
Log.Information("Configuration:\t{Configuration}", Configuration);
Log.Information("Configuration:\t{Configuration}", ((IHazConfiguration) this).Configuration);
Log.Information("Version suffix:\t{VersionSuffix}", VersionSuffix);
Log.Information("Version:\t\t{Version}", Version);
Log.Information("Tagged build:\t{IsTaggedBuild}", IsTaggedBuild);
Expand Down

0 comments on commit faf683e

Please sign in to comment.