Update versions to include prodcon build id (#819)

* Update versions to include prodcon build id
* Ensure version metadata does not appear in the package version
* Update build tools
This commit is contained in:
Nate McMaster 2018-01-30 10:38:09 -08:00 коммит произвёл GitHub
Родитель 818bb50e43
Коммит 5fae89b962
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 44 добавлений и 8 удалений

Просмотреть файл

@ -15,7 +15,7 @@
<GeneratedPackageVersionPropsPath>$(IntermediateDir)dependencies.g.props</GeneratedPackageVersionPropsPath>
<GeneratedRestoreSourcesPropsPath>$(IntermediateDir)sources.g.props</GeneratedRestoreSourcesPropsPath>
<PrepareDependsOn>$(PrepareDependsOn);VerifyPackageArtifactConfig;PrepareOutputPaths</PrepareDependsOn>
<PrepareDependsOn>SetTeamCityBuildNumberToVersion;$(PrepareDependsOn);VerifyPackageArtifactConfig;PrepareOutputPaths</PrepareDependsOn>
<CleanDependsOn>$(CleanDependsOn);CleanArtifacts;CleanUniverseArtifacts</CleanDependsOn>
<RestoreDependsOn>$(RestoreDependsOn);InstallDotNet;RestoreExternalDependencies</RestoreDependsOn>
<CompileDependsOn>$(CompileDependsOn);BuildRepositories</CompileDependsOn>

Просмотреть файл

@ -1,2 +1,2 @@
version:2.1.0-preview2-15684
commithash:308af8e3279892aad7f189ffbddd3ff9a60970d3
version:2.1.0-preview1-1008
commithash:e82dffbe8cf67ad9c07b4385cb6a1a1fc8be9fb1

Просмотреть файл

@ -1,4 +1,4 @@
{
"$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/dev/tools/korebuild.schema.json",
"channel": "dev"
"channel": "release/2.1"
}

Просмотреть файл

@ -44,6 +44,9 @@ The path to the configuration file that stores values. Defaults to korebuild.jso
.PARAMETER RestoreSources
(optional) Semi-colon delimited list of additional NuGet feeds to use as part of restore.
.PARAMETER ProductBuildId
(optional) The product build ID for correlation with orchestrated builds.
.PARAMETER MSBuildArguments
Additional MSBuild arguments to be passed through.
@ -83,6 +86,7 @@ param(
[string]$AccessTokenSuffix = $null,
[string]$RestoreSources = $null,
[string]$AssetRootUrl = $null,
[string]$ProductBuildId = $null,
[Parameter(ValueFromRemainingArguments = $true)]
[string[]]$MSBuildArguments
)
@ -221,6 +225,10 @@ if ($AccessTokenSuffix) {
$MSBuildArguments += "-p:DotNetAssetRootAccessTokenSuffix=$AccessTokenSuffix"
}
if ($ProductBuildId) {
$MSBuildArguments += "-p:DotNetProductBuildId=$ProductBuildId"
}
# Execute
$korebuildPath = Get-KoreBuild

12
run.sh
Просмотреть файл

@ -22,6 +22,7 @@ package_version_props_url=''
asset_root_url=''
access_token_suffix=''
restore_sources=''
product_build_id=''
msbuild_args=()
#
@ -44,6 +45,7 @@ __usage() {
echo " --package-version-props-url <URL> The url of the package versions props path containing dependency versions."
echo " --access-token <Token> The query string to append to any blob store access for PackageVersionPropsUrl, if any."
echo " --restore-sources <Sources> Semi-colon delimited list of additional NuGet feeds to use as part of restore."
echo " --product-build-id <ID> The product build ID for correlation with orchestrated builds."
echo " -u|--update Update to the latest KoreBuild even if the lock file is present."
echo " --reinstall Reinstall KoreBuild."
echo ""
@ -202,6 +204,12 @@ while [[ $# -gt 0 ]]; do
[ -z "${1+x}" ] && __error "Missing value for parameter --asset-root-url" && __usage
asset_root_url="$1"
;;
--product-build-id|-ProductBuildId)
shift
# This parameter can be an empty string, but it should be set
[ -z "${1+x}" ] && __error "Missing value for parameter --product-build-id" && __usage
product_build_id="$1"
;;
-u|--update|-Update)
update=true
;;
@ -272,6 +280,10 @@ if [ ! -z "$access_token_suffix" ]; then
msbuild_args[${#msbuild_args[*]}]="-p:DotNetAssetRootAccessTokenSuffix=$access_token_suffix"
fi
if [ ! -z "$product_build_id" ]; then
msbuild_args[${#msbuild_args[*]}]="-p:DotNetProductBuildId=$product_build_id"
fi
[ -z "$channel" ] && channel='dev'
[ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools'

Просмотреть файл

@ -2,12 +2,28 @@
<PropertyGroup>
<VersionPrefix>2.1.0</VersionPrefix>
<VersionSuffix>preview1</VersionSuffix>
<ExperimentalVersionPrefix>0.1.0</ExperimentalVersionPrefix>
<ExperimentalVersionSuffix>alpha1</ExperimentalVersionSuffix>
<PackageVersion Condition="'$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' == 'rtm' ">$(VersionPrefix)</PackageVersion>
<PackageVersion Condition="'$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' != 'rtm' ">$(VersionPrefix)-$(VersionSuffix)-final</PackageVersion>
<ExperimentalPackageVersion Condition="'$(IsFinalBuild)' == 'true'">$(ExperimentalVersionPrefix)-$(ExperimentalVersionSuffix)-final</ExperimentalPackageVersion>
<VersionSuffix Condition="'$(VersionSuffix)' != '' And '$(BuildNumber)' != ''">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
<PackageVersion Condition=" '$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' == 'rtm' ">$(VersionPrefix)</PackageVersion>
<PackageVersion Condition=" '$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' != 'rtm' ">$(VersionPrefix)-$(VersionSuffix)-final</PackageVersion>
<VersionSuffix Condition=" '$(VersionSuffix)' != '' AND '$(BuildNumber)' != '' ">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
<PackageVersion Condition=" '$(IsFinalBuild)' != 'true' ">$(VersionPrefix)</PackageVersion>
<PackageVersion Condition=" '$(IsFinalBuild)' != 'true' AND '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix)</PackageVersion>
<!-- Add metadata to the suffix last so it does not appear in package versions. -->
<VersionMetadata Condition=" '$(DotNetProductBuildId)' != '' ">pb-$(DotNetProductBuildId)</VersionMetadata>
<VersionSuffix Condition=" '$(VersionSuffix)' != '' AND '$(VersionMetadata)' != '' ">$(VersionSuffix)+$(VersionMetadata)</VersionSuffix>
<ExperimentalPackageVersion Condition=" '$(IsFinalBuild)' == 'true' AND '$(ExperimentalVersionSuffix)' == 'rtm' ">$(ExperimentalVersionPrefix)</ExperimentalPackageVersion>
<ExperimentalPackageVersion Condition=" '$(IsFinalBuild)' == 'true' AND '$(ExperimentalVersionSuffix)' != 'rtm' ">$(ExperimentalVersionPrefix)-$(ExperimentalVersionSuffix)-final</ExperimentalPackageVersion>
<ExperimentalVersionSuffix Condition=" '$(ExperimentalVersionSuffix)' != '' AND '$(BuildNumber)' != '' ">$(ExperimentalVersionSuffix)-$(BuildNumber)</ExperimentalVersionSuffix>
<SharedFxCliBlobChannel>release/2.1</SharedFxCliBlobChannel>
</PropertyGroup>
</Project>