|
2 | 2 | <PropertyGroup Label="Version settings"> |
3 | 3 | <!-- |
4 | 4 | Use the following values for the different release types: |
5 | | - - "alpha" |
6 | | - - "beta" |
7 | | - - "rc" |
8 | | - - "rtm" |
9 | | - - "servicing" |
| 5 | + - "alpha" - EF Core release independent, code quality unstable, major changes |
| 6 | + - "beta" - EF Core release independent, code quality stable, can introduce breaking changes |
| 7 | + - "silver" - EF Core release independent, code quality stable, only minor changes are expected |
10 | 8 |
|
| 9 | + - "preview" - EF Core release targeted, code quality stable, can introduce breaking changes |
| 10 | + - "rc" - EF Core release targeted, code quality production ready, only minor changes are expected |
| 11 | +
|
| 12 | + - "rtm" - EF Core release independent, code quality production ready, major release |
| 13 | + - "servicing" - EF Core release independent, code quality production ready, mainly bugfixes |
| 14 | + |
11 | 15 | Bump-up to the next iteration immediately after a release, so that subsequent daily builds are named |
12 | 16 | correctly. |
13 | 17 | --> |
|
24 | 28 | </PropertyGroup> |
25 | 29 |
|
26 | 30 | <!-- |
27 | | - If no version or version suffix or official version has been explicitly set, we generate a version suffix in the following format: |
| 31 | + If no official version has been explicitly set (or no version or version suffix), we generate a version suffix in the following formats: |
28 | 32 | alpha.1.ci.20201004T181121Z+sha.0a1b2c3 |
| 33 | + alpha.1.ci.20201004T181121Z.debug+sha.0a1b2c3 |
29 | 34 | --> |
30 | 35 | <PropertyGroup> |
31 | 36 | <UseVersionOverride Condition="'$(Version)' != ''">true</UseVersionOverride> |
32 | 37 | <UseVersionSuffixOverride Condition="'$(VersionSuffix)' != ''">true</UseVersionSuffixOverride> |
| 38 | + <FinalOfficialVersion>$(OfficialVersion)</FinalOfficialVersion> |
33 | 39 | </PropertyGroup> |
34 | 40 |
|
35 | | - <PropertyGroup Label="Version Suffix Handling" Condition="'$(UseVersionOverride)' != 'true' And '$(UseVersionSuffixOverride)' != 'true' And ('$(OfficialVersion)' == '' Or ($(OfficialVersion.Contains('-')) And '$(OfficialVersion)' != '-debug'))"> |
36 | | - <VersionSuffix>$(PreReleaseVersionLabel).$(PreReleaseVersionIteration)</VersionSuffix> |
37 | | - <VersionSuffix Condition="'$(ContinuousIntegrationTimestamp)' != ''">$(VersionSuffix).ci.$(ContinuousIntegrationTimestamp)</VersionSuffix> |
| 41 | + <PropertyGroup Label="Version Suffix Handling" Condition="'$(UseVersionOverride)' != 'true' And '$(UseVersionSuffixOverride)' != 'true'"> |
| 42 | + <VersionSuffix Condition="'$(OfficialVersion)' == '' Or $(OfficialVersion.Contains('-'))">$(PreReleaseVersionLabel).$(PreReleaseVersionIteration)</VersionSuffix> |
| 43 | + <VersionSuffix Condition="'$(OfficialVersion)' == '' And '$(ContinuousIntegrationTimestamp)' != ''">$(VersionSuffix).ci.$(ContinuousIntegrationTimestamp)</VersionSuffix> |
38 | 44 | <VersionSuffix Condition="'$(Configuration)' == 'Debug'">$(VersionSuffix).debug</VersionSuffix> |
39 | 45 | <VersionSuffix Condition="'$(BuildSha)' != ''">$(VersionSuffix)+sha.$(BuildSha)</VersionSuffix> |
40 | | - </PropertyGroup> |
| 46 | + <VersionSuffix>$(VersionSuffix.TrimStart(`.`))</VersionSuffix> |
41 | 47 |
|
42 | | - <PropertyGroup Condition="'$(VersionSuffix)' == ''"> |
43 | | - <VersionSuffix Condition="'$(Configuration)' == 'Debug'">debug</VersionSuffix> |
| 48 | + <FinalOfficialVersion Condition="'$(Configuration)' == 'Debug' And $(FinalOfficialVersion.Contains('-'))">$(FinalOfficialVersion).debug</FinalOfficialVersion> |
| 49 | + <FinalOfficialVersion Condition="'$(Configuration)' == 'Debug' And !$(FinalOfficialVersion.Contains('-'))">$(FinalOfficialVersion)-debug</FinalOfficialVersion> |
44 | 50 | </PropertyGroup> |
45 | 51 |
|
46 | 52 | <Target Name="EnsureVersionParameters" BeforeTargets="CoreBuild" Condition="'$(UseVersionOverride)' != 'true' And '$(UseVersionSuffixOverride)' != 'true'"> |
| 53 | + <Message Condition="'$(OfficialVersion)' != ''" Importance="high" Text="OfficialVersion: $(OfficialVersion)" /> |
| 54 | + <Message Condition="'$(OfficialVersion)' != ''" Importance="high" Text="FinalOfficialVersion: $(FinalOfficialVersion)" /> |
| 55 | + <Message Condition="'$(OfficialVersion)' != ''" Importance="high" Text="VersionPrefix: $(VersionPrefix)" /> |
| 56 | + <Message Condition="'$(OfficialVersion)' != ''" Importance="high" Text="VersionSuffix: $(VersionSuffix)" /> |
| 57 | + <Message Condition="'$(OfficialVersion)' != ''" Importance="high" Text="Version: $(Version)" /> |
| 58 | + |
47 | 59 | <Error Condition="'$(VersionPrefix)' == ''" Text="The 'VersionPrefix' property needs to be set."/> |
48 | 60 | <Error Condition="'$(PreReleaseVersionLabel)' == ''" Text="The 'PreReleaseVersionLabel' property needs to be set."/> |
49 | 61 | <Error Condition="'$(PreReleaseVersionIteration)' == ''" Text="The 'PreReleaseVersionIteration' property needs to be set."/> |
50 | | - <Error Condition="'$(OfficialVersion)' != '' And '$(OfficialVersion)' != '$(VersionPrefix)' And '$(OfficialVersion)' != '$(VersionPrefix)-$(VersionSuffix)'" Text="The 'OfficialVersion' property needs to be identical to the 'VersionPrefix' property or to a combination of the 'VersionPrefix' and the 'VersionSuffix' properties."/> |
51 | | - <!-- |
52 | | - <Message Importance="high" Text="VersionPrefix: $(VersionPrefix)" /> |
53 | | - <Message Importance="high" Text="VersionSuffix: $(VersionSuffix)" /> |
54 | | - <Message Importance="high" Text="Version: $(Version)" /> |
55 | | - --> |
| 62 | + <Error Condition="'$(OfficialVersion)' != '' And '$(FinalOfficialVersion)' != '$(VersionPrefix)' And '$(FinalOfficialVersion)' != '$(VersionPrefix)-$(VersionSuffix)'" Text="The 'OfficialVersion' property needs to be identical to the 'VersionPrefix' property or to a combination of the 'VersionPrefix' and the 'VersionSuffix' properties." /> |
56 | 63 | </Target> |
57 | 64 | </Project> |
0 commit comments