Skip to content

Commit

Permalink
Keep prerelease and build metadata when using fix notation
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Démoulins authored and majkinetor committed Oct 29, 2017
1 parent c982425 commit 9f82836
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions AU/Public/Update-Package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit 9f82836

Please sign in to comment.