Skip to content

Commit

Permalink
Update experimental IsShipping and block stable properties (dotnet#41513
Browse files Browse the repository at this point in the history
)
  • Loading branch information
safern committed Oct 3, 2019
1 parent 1bfc20a commit 4ee9258
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 14 deletions.
8 changes: 5 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,11 @@
</PropertyGroup>

<PropertyGroup>
<!-- When IsShipping property is set, other IsShipping* properties take its value if they are not set.
This is why IsShippingPackage is only set for Private packages, as Experimental are covered with IsShipping -->
<IsShipping Condition="$(MSBuildProjectName.Contains('Experimental'))">false</IsShipping>
<!-- Experimental packages should not be stable -->
<SuppressFinalPackageVersion Condition="'$(SuppressFinalPackageVersion)' == '' and $(MSBuildProjectName.Contains('Experimental'))">true</SuppressFinalPackageVersion>
<IsShippingAssembly Condition="$(MSBuildProjectName.Contains('Experimental'))">false</IsShippingAssembly>

<!-- We don't want Private packages to be shipped to NuGet.org -->
<IsShippingPackage Condition="$(MSBuildProjectName.Contains('Private')) and '$(MSBuildProjectExtension)' == '.pkgproj'">false</IsShippingPackage>
</PropertyGroup>
</Project>
4 changes: 2 additions & 2 deletions eng/Packaging.targets
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
'%(Dependency.Identity)' != '_._'" />
</Target>

<Target Name="BlockStable" Condition="'$(BlockStable)' == 'true'" AfterTargets="CalculatePackageVersion">
<Target Name="BlockStable" Condition="'$(SuppressFinalPackageVersion)' == 'true'" AfterTargets="CalculatePackageVersion">
<!-- DO NOT ship this packages as stable -->
<Error Condition="!$(PackageVersion.Contains('-'))" Text="Package $(Id) should not be built stable" />
</Target>
Expand All @@ -46,7 +46,7 @@
<ItemGroup>
<_PackageIdentityWithoutPrerelease Include="$(Id)">
<Version>$(PackageVersion)</Version>
<BlockStable>$(BlockStable)</BlockStable>
<SuppressFinalPackageVersion>$(SuppressFinalPackageVersion)</SuppressFinalPackageVersion>
</_PackageIdentityWithoutPrerelease>
</ItemGroup>
</Target>
Expand Down
4 changes: 2 additions & 2 deletions pkg/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
</ItemGroup>

<PropertyGroup>
<!-- BlockStable on private packages by default -->
<BlockStable Condition="'$(BlockStable)' == '' and $(MSBuildProjectName.Contains('Private'))">true</BlockStable>
<!-- SuppressFinalPackageVersion on private packages by default -->
<SuppressFinalPackageVersion Condition="'$(SuppressFinalPackageVersion)' == '' and $(MSBuildProjectName.Contains('Private'))">true</SuppressFinalPackageVersion>
</PropertyGroup>

</Project>
3 changes: 2 additions & 1 deletion src/System.Numerics.Tensors/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<PackageVersion>0.3.0</PackageVersion>
<StrongNameKeyId>Open</StrongNameKeyId>
<!-- This is a preview package. Do not mark as stable. -->
<BlockStable>true</BlockStable>
<SuppressFinalPackageVersion>true</SuppressFinalPackageVersion>
<IsShippingAssembly>false</IsShippingAssembly>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<!-- we need to be supported on pre-nuget-3 platforms (Dev12, Dev11, etc) -->
<MinClientVersion>2.8.6</MinClientVersion>
<IsShipping>false</IsShipping>
</PropertyGroup>
<ItemGroup>
<!-- We don't include the reference project for two reasons:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<!-- DO NOT ship this as stable. It contains preview-only APIs that will be stable in a future version. -->
<BlockStable>true</BlockStable>
<StrongNameKeyId>Open</StrongNameKeyId>
</PropertyGroup>
</Project>
2 changes: 0 additions & 2 deletions src/System.Utf8String.Experimental/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<!-- System.Memory uses the Open key, so we will also. -->
<StrongNameKeyId>Open</StrongNameKeyId>
<!-- This is a preview package. Do not ship as stable. -->
<BlockStable>true</BlockStable>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/packages.builds
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<UpdatePackageIndex
PackageIndexFile="$(PackageIndexFile)"
StablePackages="@(_StablePackages)"
Condition="'%(_StablePackages.BlockStable)' != 'true'" />
Condition="'%(_StablePackages.SuppressFinalPackageVersion)' != 'true'" />

</Target>

Expand Down

0 comments on commit 4ee9258

Please sign in to comment.