fix(ci): add GitVersion tool
All checks were successful
agola/client-dotnet/Lint The run finished successfully

This commit is contained in:
Peter Kurfer 2022-09-26 16:41:39 +02:00
parent d8143ffd3a
commit d26b7ff041
No known key found for this signature in database
2 changed files with 8 additions and 2 deletions

View file

@ -13,6 +13,12 @@
"commands": [
"nuke"
]
},
"gitversion.tool": {
"version": "5.10.3",
"commands": [
"dotnet-gitversion"
]
}
}
}

View file

@ -25,7 +25,7 @@ class Build : NukeBuild
[Solution] readonly Solution? Solution;
[GitRepository] readonly GitRepository? GitRepository;
[GitVersion(NoFetch = true, Framework = "net6.0")] readonly GitVersion? GitVersion;
[GitVersion(Framework = "net6.0", NoFetch = true)] readonly GitVersion? GitVersion;
GitLab? CI => GitLab.Instance;
@ -90,7 +90,7 @@ class Build : NukeBuild
.SetProject(csproj)
.SetConfiguration(Configuration)
.SetOutputDirectory(ArtifactsDirectory)
.SetVersion(GitVersion?.FullSemVer ?? SemanticVersion.Parse(CI?.CommitTag?.TrimStart('v') ?? "0.0.1").ToNormalizedString())
.SetVersion(GitVersion?.NuGetVersionV2 ?? SemanticVersion.Parse(CI?.CommitTag?.TrimStart('v') ?? "0.0.1").ToNormalizedString())
.EnableIncludeSource()
.EnableIncludeSymbols()
.EnableNoRestore()