Skip to content

Commit b2998a4

Browse files
authored
Fix CI for releases. (#194)
1 parent 3330558 commit b2998a4

File tree

2 files changed

+26
-19
lines changed

2 files changed

+26
-19
lines changed

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ jobs:
338338
path: ${{ env.commitGreenTestsFile }}
339339
NuGet:
340340
needs: BuildAndTest
341-
if: always() && (needs.BuildAndTest.result == 'success' || needs.BuildAndTest.result == 'skipped') && github.repository == 'CirrusRedOrg/EntityFrameworkCore.Jet'
341+
if: always() && (needs.BuildAndTest.result == 'success' || needs.BuildAndTest.result == 'skipped') && (github.event_name == 'push' || github.event_name == 'release') && github.repository == 'CirrusRedOrg/EntityFrameworkCore.Jet'
342342
runs-on: ubuntu-latest
343343
steps:
344344
- name: Checkout

Version.props

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
<PropertyGroup Label="Version settings">
33
<!--
44
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
108
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+
1115
Bump-up to the next iteration immediately after a release, so that subsequent daily builds are named
1216
correctly.
1317
-->
@@ -24,34 +28,37 @@
2428
</PropertyGroup>
2529

2630
<!--
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:
2832
alpha.1.ci.20201004T181121Z+sha.0a1b2c3
33+
alpha.1.ci.20201004T181121Z.debug+sha.0a1b2c3
2934
-->
3035
<PropertyGroup>
3136
<UseVersionOverride Condition="'$(Version)' != ''">true</UseVersionOverride>
3237
<UseVersionSuffixOverride Condition="'$(VersionSuffix)' != ''">true</UseVersionSuffixOverride>
38+
<FinalOfficialVersion>$(OfficialVersion)</FinalOfficialVersion>
3339
</PropertyGroup>
3440

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>
3844
<VersionSuffix Condition="'$(Configuration)' == 'Debug'">$(VersionSuffix).debug</VersionSuffix>
3945
<VersionSuffix Condition="'$(BuildSha)' != ''">$(VersionSuffix)+sha.$(BuildSha)</VersionSuffix>
40-
</PropertyGroup>
46+
<VersionSuffix>$(VersionSuffix.TrimStart(`.`))</VersionSuffix>
4147

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>
4450
</PropertyGroup>
4551

4652
<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+
4759
<Error Condition="'$(VersionPrefix)' == ''" Text="The 'VersionPrefix' property needs to be set."/>
4860
<Error Condition="'$(PreReleaseVersionLabel)' == ''" Text="The 'PreReleaseVersionLabel' property needs to be set."/>
4961
<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." />
5663
</Target>
5764
</Project>

0 commit comments

Comments
 (0)