Skip to content

Commit

Permalink
Merge pull request #17834 from mmitche/stabilize
Browse files Browse the repository at this point in the history
[release/3.0] Stabilize package versions
  • Loading branch information
dougbu authored Sep 14, 2019
2 parents f98574f + 3a36b62 commit b403b17
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
<VersionPrefix>3.0.0</VersionPrefix>
<PreReleaseVersionLabel>rc2</PreReleaseVersionLabel>
<IncludeSourceRevisionInInformationalVersion>False</IncludeSourceRevisionInInformationalVersion>
<!--
When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages
-->
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">true</StabilizePackageVersion>
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
</PropertyGroup>
<PropertyGroup Label="Arcade settings">
<!-- Opt-in to using the ref assembly version bundled with Arcade. -->
Expand Down
6 changes: 6 additions & 0 deletions test/EFCore.Tests/ModelSourceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ public void Stores_model_version_information_as_annotation_on_model()
var packageVersion = typeof(Context1).Assembly.GetCustomAttributes<AssemblyMetadataAttribute>()
.Single(m => m.Key == "PackageVersion").Value;

var prereleaseIndex = packageVersion.IndexOf("-", StringComparison.Ordinal);
if (prereleaseIndex != -1)
{
packageVersion = packageVersion.Substring(0, prereleaseIndex);
}

Assert.StartsWith(packageVersion, model.GetProductVersion(), StringComparison.OrdinalIgnoreCase);
}

Expand Down

0 comments on commit b403b17

Please sign in to comment.