84 lines
5.8 KiB
XML
84 lines
5.8 KiB
XML
<Project>
|
|
<PropertyGroup>
|
|
<AspNetCoreMajorVersion>3</AspNetCoreMajorVersion>
|
|
<AspNetCoreMinorVersion>0</AspNetCoreMinorVersion>
|
|
<AspNetCorePatchVersion>0</AspNetCorePatchVersion>
|
|
<PreReleaseLabel>preview</PreReleaseLabel>
|
|
<PreReleaseBrandingLabel>Preview</PreReleaseBrandingLabel>
|
|
<ExperimentalVersionPrefix>0.3.$(AspNetCorePatchVersion)</ExperimentalVersionPrefix>
|
|
<!-- ANCM versioning is intentionally 10 + AspNetCoreMajorVersion because earlier versions of ANCM shipped as 8.x. -->
|
|
<AspNetCoreModuleVersionMajor>1$(AspNetCoreMajorVersion)</AspNetCoreModuleVersionMajor>
|
|
|
|
<OfficialBuildId Condition="'$(OfficialBuildId)' == ''">$(BUILD_BUILDNUMBER)</OfficialBuildId>
|
|
<OfficialBuildId Condition="'$(OfficialBuildId)' == '' AND '$(TEAMCITY_VERSION)' != ''">$([System.DateTime]::Now.ToString('yyyyMMdd')).$(BUILD_NUMBER)</OfficialBuildId>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition=" '$(OfficialBuildId)' != '' AND '$(BuildNumberSuffix)' == '' ">
|
|
<!-- This *mostly* implements core versioning. Spec: https://github.com/dotnet/arcade/blob/master/Documentation/CorePackages/Versioning.md -->
|
|
<_BuildNumber>$(OfficialBuildId)</_BuildNumber>
|
|
|
|
<!-- _BuildNumber from CI is assumed to have format "yyyyMMdd.r". -->
|
|
<_BuildNumberYY>$(_BuildNumber.Substring(2, 2))</_BuildNumberYY>
|
|
<_BuildNumberMM>$(_BuildNumber.Substring(4, 2))</_BuildNumberMM>
|
|
<_BuildNumberDD>$(_BuildNumber.Substring(6, 2))</_BuildNumberDD>
|
|
<_BuildNumberR>$(_BuildNumber.Substring(9))</_BuildNumberR>
|
|
|
|
<!-- yy * 1000 + mm * 50 + dd -->
|
|
<_BuildNumberShortDate>$([MSBuild]::Add($([MSBuild]::Add($([MSBuild]::Multiply($(_BuildNumberYY), 1000)), $([MSBuild]::Multiply($(_BuildNumberMM), 50)))), $(_BuildNumberDD)))</_BuildNumberShortDate>
|
|
|
|
<VersionSuffixBuildOfTheDay>$([System.Convert]::ToInt32($(_BuildNumberR)))</VersionSuffixBuildOfTheDay>
|
|
|
|
<!-- This is where we currently differ from the core versioning spec. This can be removed when we get official builds running in Azure Pipelines. -->
|
|
<VersionSuffixBuildOfTheDayPadded Condition=" '$(TEAMCITY_VERSION)' == '' ">$(VersionSuffixBuildOfTheDay.PadLeft(2, '0'))</VersionSuffixBuildOfTheDayPadded>
|
|
<VersionSuffixBuildOfTheDayPadded Condition=" '$(TEAMCITY_VERSION)' != '' ">$(VersionSuffixBuildOfTheDay.PadLeft(4, '0'))</VersionSuffixBuildOfTheDayPadded>
|
|
|
|
<!-- TODO: consider using semver 2.0 instead, when/if https://github.com/dotnet/core-setup/issues/4795 is resolved -->
|
|
<BuildNumberSuffix>$(_BuildNumberShortDate)-$(VersionSuffixBuildOfTheDayPadded)</BuildNumberSuffix>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<BuildNumberSuffix Condition=" '$(BuildNumberSuffix)' == '' ">0</BuildNumberSuffix>
|
|
<VersionPrefix>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion)</VersionPrefix>
|
|
<VersionSuffix>$(PreReleaseLabel)-$(BuildNumberSuffix)</VersionSuffix>
|
|
<BrandingVersionSuffix>$(PreReleaseBrandingLabel) Build $(BuildNumberSuffix)</BrandingVersionSuffix>
|
|
|
|
<!-- Servicing builds have different characteristics for the way dependencies, baselines, and versions are handled. -->
|
|
<IsServicingBuild Condition=" '$(PreReleaseLabel)' == 'servicing' ">true</IsServicingBuild>
|
|
<!-- Run the build with /p:IsFinalBuild=true to produce the product with 'final' branding and versioning -->
|
|
<IsFinalBuild Condition=" '$(IsFinalBuild)' == '' ">false</IsFinalBuild>
|
|
<IncludePreReleaseLabelInPackageVersion>true</IncludePreReleaseLabelInPackageVersion>
|
|
<IncludePreReleaseLabelInPackageVersion Condition=" '$(IsFinalBuild)' == 'true' AND ('$(PreReleaseLabel)' == 'servicing' OR '$(PreReleaseLabel)' == 'rtm')">false</IncludePreReleaseLabelInPackageVersion>
|
|
|
|
<!-- The 'human friendly' version to display in installers. In pre-release builds, this might be "2.0.7 Preview 2 Build 12356". In final builds, it should be "2.0.7" -->
|
|
<PackageBrandingVersion>$(VersionPrefix)</PackageBrandingVersion>
|
|
<PackageBrandingVersion Condition=" '$(IncludePreReleaseLabelInPackageVersion)' == 'true' ">$(PackageBrandingVersion) $(BrandingVersionSuffix.Trim())</PackageBrandingVersion>
|
|
|
|
<!-- The version in files -->
|
|
<PackageVersion>$(VersionPrefix)</PackageVersion>
|
|
<PackageVersion Condition=" '$(IncludePreReleaseLabelInPackageVersion)' == 'true' ">$(VersionPrefix)-$(VersionSuffix)</PackageVersion>
|
|
|
|
<SharedFxVersion>$(PackageVersion)</SharedFxVersion>
|
|
|
|
<!-- Experimental packages which are not truly supported yet. -->
|
|
<ExperimentalPackageVersion>$(ExperimentalVersionPrefix)</ExperimentalPackageVersion>
|
|
<ExperimentalPackageVersion Condition=" '$(IncludePreReleaseLabelInPackageVersion)' == 'true' ">$(ExperimentalVersionPrefix)-$(VersionSuffix)</ExperimentalPackageVersion>
|
|
|
|
<VersionMetadata Condition=" '$(DotNetProductBuildId)' != '' ">pb-$(DotNetProductBuildId)</VersionMetadata>
|
|
<VersionSuffix Condition=" '$(VersionMetadata)' != '' ">$(VersionSuffix)+$(VersionMetadata)</VersionSuffix>
|
|
|
|
<SharedFxCliBlobChannel>master</SharedFxCliBlobChannel>
|
|
|
|
<!-- This is used for error checking to ensure generated code and baselines are up to date when we increment the patch. -->
|
|
<PreviousAspNetCoreReleaseVersion Condition=" '$(AspNetCorePatchVersion)' != '0' ">$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$([MSBuild]::Subtract($(AspNetCorePatchVersion), 1))</PreviousAspNetCoreReleaseVersion>
|
|
</PropertyGroup>
|
|
|
|
<!-- Run 'dotnet msbuild version.props' to test changes to this file. -->
|
|
<Target Name="InspectVersionNumbers">
|
|
<Message Importance="High" Text="PackageVersion = '$(PackageVersion)'" />
|
|
<Message Importance="High" Text="PackageBrandingVersion = '$(PackageBrandingVersion)'" />
|
|
<Message Importance="High" Text="ExperimentalPackageVersion = '$(ExperimentalPackageVersion)'" />
|
|
<Message Importance="High" Text="SharedFxCliBlobChannel = '$(SharedFxCliBlobChannel)'" />
|
|
</Target>
|
|
|
|
</Project>
|