Skip to content

Commit

Permalink
Simplify GitVersion and fix assembly version properties
Browse files Browse the repository at this point in the history
Removed explicit branch specification for GitVersion to streamline version fetching. Corrected the assembly and file version properties to use AssemblySemFileVer.
  • Loading branch information
Gary Woodfine committed Sep 19, 2024
1 parent d799464 commit 73e55d4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,14 @@ Task("Build")
.IsDependentOn("Restore")
.Does(() => {
var version = GitVersion(new GitVersionSettings {
Branch = "main"
});
var version = GitVersion(new GitVersionSettings {});
var buildSettings = new DotNetBuildSettings {
Configuration = configuration,
MSBuildSettings = new DotNetMSBuildSettings()
.WithProperty("Version", version.FullSemVer)
.WithProperty("AssemblyVersion", version.AssemblySemVer)
.WithProperty("FileVersion", version.FullSemVer)
.WithProperty("AssemblyVersion", version.AssemblySemFileVer)
.WithProperty("FileVersion", version.AssemblySemFileVer)
};
var projects = GetFiles("./src/**/*.csproj");
foreach(var project in projects )
Expand Down

0 comments on commit 73e55d4

Please sign in to comment.