fix(ci): add GitVersion tool
All checks were successful
agola/client-dotnet/Lint The run finished successfully
All checks were successful
agola/client-dotnet/Lint The run finished successfully
This commit is contained in:
parent
d8143ffd3a
commit
d26b7ff041
2 changed files with 8 additions and 2 deletions
|
@ -13,6 +13,12 @@
|
|||
"commands": [
|
||||
"nuke"
|
||||
]
|
||||
},
|
||||
"gitversion.tool": {
|
||||
"version": "5.10.3",
|
||||
"commands": [
|
||||
"dotnet-gitversion"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue