Tweak AppVeyor build version

This commit is contained in:
Alex Barney 2019-02-16 20:50:41 -06:00
parent 199dbf7543
commit 5ec829915d
2 changed files with 19 additions and 15 deletions

View file

@ -60,7 +60,11 @@ namespace LibHacBuild
.OnlyWhenStatic(() => GitRepository != null)
.Executes(() =>
{
AppVeyorVersion = $"{GitVersion.AssemblySemVer}-{GitVersion.PreReleaseTag}+{GitVersion.Sha.Substring(0, 8)}";
AppVeyorVersion = $"{GitVersion.AssemblySemVer}";
if (!string.IsNullOrWhiteSpace(GitVersion.PreReleaseTag))
{
AppVeyorVersion += $"-{GitVersion.PreReleaseTag}+{GitVersion.Sha.Substring(0, 8)}";
}
string suffix = GitVersion.PreReleaseTag;