File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1- <Project >
1+ <Project TreatAsLocalProperty = " VersionPrefix " >
22 <!-- To extend/change the defaults, create a Directory.props alongside this file -->
33
44 <PropertyGroup Label =" CI" Condition =" '$(CI)' == ''" >
136136 <VersionSuffix Condition =" !$(VersionLabel.Contains('refs/tags/'))" >$(_VersionLabel)</VersionSuffix >
137137 <!-- Special case for tags, the label is actually the version. Backs compat since passed-in value overrides MSBuild-set one -->
138138 <Version Condition =" $(VersionLabel.Contains('refs/tags/'))" >$(_VersionLabel)</Version >
139+
140+ <!-- In order for latest from main/master to always be greatest when using -prerelease switch on install/run,
141+ we change the scheme as follows:
142+ - main/master remain as today: VersionPrefix: 42.42.${{ github.run_number }} (from yaml)
143+ - others: VersionPrefix: 42.42.0-[label].${{ github.run_number }}
144+ -->
145+ <IsMaster Condition =" $(VersionLabel.Contains('refs/heads/main')) or $(VersionLabel.Contains('refs/heads/master'))" >true</IsMaster >
146+ <VersionPrefix Condition =" '$(IsMaster)' != 'true'" >42.42.0</VersionPrefix >
147+ <VersionSuffix Condition =" '$(IsMaster)' != 'true'" >$(VersionSuffix).$(GITHUB_RUN_NUMBER)</VersionSuffix >
139148 </PropertyGroup >
140149
141150 <ItemGroup Label =" ThisAssembly.Project" >
You can’t perform that action at this time.
0 commit comments