Pass in patch version from pipeline (#2020)

* Pass in patch version from pipeline

* Correct patch version

* Fix packaging

* Fix nuget version

* Revert nuget package changes
This commit is contained in:
Charles Gagnon
2023-04-20 12:07:40 -07:00
committed by GitHub
parent 6120b99a56
commit dec4f2d4b9
3 changed files with 12 additions and 2 deletions

View File

@@ -12,8 +12,15 @@
<RootDir>$(MSBuildThisFileDirectory)</RootDir>
<!-- Defaults-->
<!-- The revision version is currently generated by the release stage, which runs after build. So until
that can be refactored just set to 0/99 here since it doesn't need to exactly match the release version
(especially with the commit hash being embedded in)
-->
<Revision Condition="$(Patch) != ''">0</Revision>
<Revision Condition="$(Patch) == ''">99</Revision>
<Major Condition="$(Major) == ''">99</Major>
<Minor Condition="$(Minor) == ''">99</Minor>
<Patch Condition="$(Patch) == ''">99</Patch>
<Build_BuildNumber Condition="'$(Build_BuildNumber)' == ''">99.99</Build_BuildNumber>
<StableRelease Condition="$(StableRelease) == ''">false</StableRelease>
@@ -23,7 +30,7 @@
<!-- AssemblyFileVersion should change for every build. -->
<!-- For preview releases, sample Version = 3.0.20221104.1-preview -->
<!-- For stable releases, sample Version = 3.0.0 -->
<VersionPrefix>$(Major).$(Minor).$(Build_BuildNumber)</VersionPrefix>
<VersionPrefix>$(Major).$(Minor).$(Patch).$(Revision)</VersionPrefix>
<VersionPrefix Condition="$(StableRelease.Equals('true'))">$(Major).$(Minor).0</VersionPrefix>
<VersionSuffix Condition="!$(StableRelease.Equals('true'))">preview</VersionSuffix>
<AssemblyFileVersion>$(VersionPrefix)-$(VersionSuffix)</AssemblyFileVersion>