Skip to content

Commit

Permalink
Fixes #50 Set version once as full verison string
Browse files Browse the repository at this point in the history
  • Loading branch information
Kieranties committed Feb 8, 2019
1 parent 590ad9d commit af1d471
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<PropertyGroup Label="Local build version">
<Version Condition="'$(Version)' == ''">1.0.0</Version>
<PackageVersion>$(Version)</PackageVersion>
<PackageVersion Condition="'$(VersionSuffix)' != ''">$(Version)-$(VersionSuffix)</PackageVersion>
</PropertyGroup>

<PropertyGroup Label="All package targets">
Expand Down
5 changes: 1 addition & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ jobs:
Write-Output $result
$fullVersion = ($result | ConvertFrom-Json).Formats.Semver2
Write-Output "##vso[build.updatebuildnumber]$fullVersion"
if($fullVersion -match '(?<version>\d+\.\d+\.\d+(?:\.\d+)?)-?(?<suffix>.*)') {
Write-Output "##vso[task.setvariable variable=Version;]$($Matches.version)"
Write-Output "##vso[task.setvariable variable=VersionSuffix;]$($Matches.suffix)"
}
Write-Output "##vso[task.setvariable variable=Version;]$fullVersion"
displayName: 'Prepare: Set version information'
# Build/Pack the assets
Expand Down

0 comments on commit af1d471

Please sign in to comment.