mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Fix version display for public releases
This commit is contained in:
@@ -145,9 +145,13 @@ namespace Velopack
|
|||||||
IsSingleFile = true;
|
IsSingleFile = true;
|
||||||
|
|
||||||
// get git/nuget version from nbgv metadata
|
// get git/nuget version from nbgv metadata
|
||||||
VelopackNugetVersion = NuGetVersion.Parse(ThisAssembly.AssemblyInformationalVersion);
|
if (ThisAssembly.IsPublicRelease) {
|
||||||
if (VelopackNugetVersion.HasMetadata) {
|
VelopackNugetVersion = NuGetVersion.Parse(NuGetVersion.Parse(ThisAssembly.AssemblyInformationalVersion).ToNormalizedString());
|
||||||
VelopackNugetVersion = NuGetVersion.Parse(VelopackNugetVersion.ToNormalizedString() + "-g" + VelopackNugetVersion.Metadata);
|
} else {
|
||||||
|
VelopackNugetVersion = NuGetVersion.Parse(ThisAssembly.AssemblyInformationalVersion);
|
||||||
|
if (VelopackNugetVersion.HasMetadata) {
|
||||||
|
VelopackNugetVersion = NuGetVersion.Parse(VelopackNugetVersion.ToNormalizedString() + "-g" + VelopackNugetVersion.Metadata);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
VelopackDisplayVersion = VelopackNugetVersion.ToNormalizedString() + (VelopackNugetVersion.IsPrerelease ? " (prerelease)" : "");
|
VelopackDisplayVersion = VelopackNugetVersion.ToNormalizedString() + (VelopackNugetVersion.IsPrerelease ? " (prerelease)" : "");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user