Tweak pre-release package version

This commit is contained in:
Alex Barney 2019-02-16 20:31:35 -06:00
parent b68261a092
commit 199dbf7543

View file

@ -62,10 +62,22 @@ namespace LibHacBuild
{
AppVeyorVersion = $"{GitVersion.AssemblySemVer}-{GitVersion.PreReleaseTag}+{GitVersion.Sha.Substring(0, 8)}";
string suffix = GitVersion.PreReleaseTag;
if (!string.IsNullOrWhiteSpace(suffix))
{
if (!GitRepository.IsOnMasterBranch())
{
suffix = $"-{suffix}";
}
suffix += $"+{GitVersion.Sha.Substring(0, 8)}";
}
VersionProps = new Dictionary<string, object>
{
["VersionPrefix"] = GitVersion.AssemblySemVer,
["VersionSuffix"] = GitVersion.PreReleaseTag
["VersionSuffix"] = suffix
};
Console.WriteLine($"Building version {AppVeyorVersion}");