From 9f828363796239124b2119e61d864540c9ee228a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20D=C3=A9moulins?= Date: Sun, 22 Oct 2017 00:22:12 +0200 Subject: [PATCH] Keep prerelease and build metadata when using fix notation --- AU/Public/Update-Package.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/AU/Public/Update-Package.ps1 b/AU/Public/Update-Package.ps1 index ccde80aa..9b109d42 100644 --- a/AU/Public/Update-Package.ps1 +++ b/AU/Public/Update-Package.ps1 @@ -279,8 +279,9 @@ function Update-Package { if (($rev -ne -1) -and !$revdate) { return } $build = if ($v.Build -eq -1) {0} else {$v.Build} - $package.RemoteVersion = '{0}.{1}.{2}.{3}' -f $v.Major, $v.Minor, $build, $d - $Latest.Version = [AUVersion] $package.RemoteVersion + $v = [version] ('{0}.{1}.{2}.{3}' -f $v.Major, $v.Minor, $build, $d) + $package.RemoteVersion = [AUVersion]::new($v, $Latest.NuspecVersion.Prerelease, $Latest.NuspecVersion.BuildMetadata) + $Latest.Version = $package.RemoteVersion } function set_latest( [HashTable]$latest, [string] $version ) {