Fix CI for official prereleases.

pull/104/head
Laurents Meyer 5 years ago
parent db2c056b9f
commit f0257af91c

@ -2,11 +2,15 @@
<PropertyGroup Label="Version settings">
<!--
Use the following values for the different release types:
- "alpha"
- "beta"
- "rc"
- "rtm"
- "servicing"
- "alpha" - EF Core release independent, code quality unstable, major changes
- "beta" - EF Core release independent, code quality stable, can introduce breaking changes
- "silver" - EF Core release independent, code quality stable, can introduce breaking changes
- "preview" - EF Core release targeted, code quality stable, can introduce breaking changes
- "rc" - EF Core release targeted, code quality production ready, only minor changes are expected
- "rtm" - EF Core release independent, code quality production ready, major release
- "servicing" - EF Core release independent, code quality production ready, mainly bugfixes
-->
<VersionPrefix>3.1.0</VersionPrefix>
<PreReleaseVersionLabel>rtm</PreReleaseVersionLabel>
@ -29,7 +33,7 @@
<UseVersionSuffixOverride Condition="'$(VersionSuffix)' != ''">true</UseVersionSuffixOverride>
</PropertyGroup>
<PropertyGroup Label="Version Suffix Handling" Condition="'$(UseVersionOverride)' != 'true' And '$(UseVersionSuffixOverride)' != 'true' And '$(OfficialVersion)' == ''">
<PropertyGroup Label="Version Suffix Handling" Condition="'$(UseVersionOverride)' != 'true' And '$(UseVersionSuffixOverride)' != 'true' And ('$(OfficialVersion)' == '' Or $(OfficialVersion.Contains('-')))">
<VersionSuffix>$(PreReleaseVersionLabel).$(PreReleaseVersionIteration)</VersionSuffix>
<VersionSuffix Condition="'$(ContinuousIntegrationTimestamp)' != ''">$(VersionSuffix).ci.$(ContinuousIntegrationTimestamp)</VersionSuffix>
<VersionSuffix Condition="'$(BuildSha)' != ''">$(VersionSuffix)+sha.$(BuildSha)</VersionSuffix>
@ -39,7 +43,7 @@
<Error Condition="'$(VersionPrefix)' == ''" Text="The 'VersionPrefix' property needs to be set." />
<Error Condition="'$(PreReleaseVersionLabel)' == ''" Text="The 'PreReleaseVersionLabel' property needs to be set." />
<Error Condition="'$(PreReleaseVersionIteration)' == ''" Text="The 'PreReleaseVersionIteration' property needs to be set." />
<Error Condition="'$(OfficialVersion)' != '' And '$(OfficialVersion)' != '$(VersionPrefix)'" Text="The 'OfficialVersion' property needs to be identical to the 'VersionPrefix' property." />
<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." />
<!--
<Message Importance="high" Text="VersionPrefix: $(VersionPrefix)" />
<Message Importance="high" Text="VersionSuffix: $(VersionSuffix)" />

@ -135,7 +135,7 @@ jobs:
- pwsh: dotnet --info
displayName: .NET Information
- pwsh: |
$officialBuild = '$(Build.SourceBranch)' -match '(?<=^refs/tags/v)\d+\.\d+\.\d+$'
$officialBuild = '$(Build.SourceBranch)' -match '(?<=^refs/tags/v)\d+\.\d+\.\d+.*$'
$officialVersion = $Matches.0
$wipBuild = '$(Build.SourceBranch)' -match '^refs/heads/.*-wip$'
$ciBuildOnly = $wipBuild -or ('$(Build.SourceBranch)' -match '^refs/heads/(?:master|.*-servicing)$')

Loading…
Cancel
Save