From 47da51331333a0ca7f002e0b0226eaef9758fab9 Mon Sep 17 00:00:00 2001 From: John Beisner Date: Mon, 5 Feb 2018 15:50:50 -0800 Subject: [PATCH] Infrastructure updates: CLI:master -> release/2.1.3xx (#8541) * Repairing the first pass call to 'dotnet msbuild'; CLI:master (#8488) * '$ExtraParametersNoTargets', which is used on the first pass call to 'dotnet msbuild', currently is of type 'string' not 'List'1' as is '$ExtraParameters'. This results in the non-honoring of any parameter other than parameter one. Solution: Make a copy of '$ExtraParameters' to '$ExtraParametersNoTargets' of type 'List'1' and remove the targets from the list. * Swallow the boolean output from '$ExtraParametersNoTargets.Remove' * Specifically capture "/t:" or "/target:" only. * The "${arg,,}" syntax works well on dev and Jenkins OSX machines but does not work correctly on VSO build machines [likely a lower version of bash on VSO machines]. Therefore, using 'awk' to transforming to lower case. (#8497) * Orchestrated final publish; CLI:master (#8504) * Orchestrated final publish: https://github.com/dotnet/core-eng/issues/2407 * Changes per code review... * The orchestrated "PackageVersion" type variables should not be used in any of the 'proj' files of the built build tools under: "build_projects" --- build/AzureInfo.props | 5 +++-- build/DependencyVersions.props | 2 +- build/Publish.targets | 1 + build/publish/PublishContent.targets | 2 ++ build/publish/PublishNupkgToBlobFeed.targets | 1 + build_projects/dotnet-cli-build/dotnet-cli-build.csproj | 2 +- run-build.ps1 | 8 ++++---- run-build.sh | 5 +++-- 8 files changed, 16 insertions(+), 10 deletions(-) diff --git a/build/AzureInfo.props b/build/AzureInfo.props index c5dc4a579..6e1739c62 100644 --- a/build/AzureInfo.props +++ b/build/AzureInfo.props @@ -1,9 +1,10 @@ + Sdk true false - Sdk - assets/$(BlobStoragePartialRelativePath) + $(Product) + assets/$(Product) https://dotnetcli.azureedge.net/dotnet/ diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 2fb3a2ed9..998f5d3d3 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -68,7 +68,7 @@ 2.1.0-prerelease-02411-04 2.0.0-preview2-25331-01 - 2.1.0-prerelease-02411-04 + 2.1.0-prerelease-02430-04 diff --git a/build/Publish.targets b/build/Publish.targets index a98d7171f..d64388410 100644 --- a/build/Publish.targets +++ b/build/Publish.targets @@ -84,6 +84,7 @@ ManifestBuildId="$(FullNugetVersion)" ManifestCommit="$(CommitHash)" ManifestName="$(BuildName)" + ManifestBuildData="ProductVersion=$(FullNugetVersion)" Overwrite="false" PublishFlatContainer="true" SkipCreateManifest="$(IsNotOrchestratedPublish)" /> diff --git a/build/publish/PublishContent.targets b/build/publish/PublishContent.targets index d18d57238..41b7886a8 100644 --- a/build/publish/PublishContent.targets +++ b/build/publish/PublishContent.targets @@ -33,6 +33,7 @@ ManifestBuildId="$(FullNugetVersion)" ManifestCommit="$(CommitHash)" ManifestName="$(BuildName)" + ManifestBuildData="ProductVersion=$(FullNugetVersion)" Overwrite="$(OverwriteOnPublish)" PublishFlatContainer="true" SkipCreateManifest="$(IsNotOrchestratedPublish)" /> @@ -51,6 +52,7 @@ ManifestBuildId="$(FullNugetVersion)" ManifestCommit="$(CommitHash)" ManifestName="$(BuildName)" + ManifestBuildData="ProductVersion=$(FullNugetVersion)" Overwrite="$(OverwriteOnPublish)" PublishFlatContainer="true" SkipCreateManifest="$(IsNotOrchestratedPublish)" /> diff --git a/build/publish/PublishNupkgToBlobFeed.targets b/build/publish/PublishNupkgToBlobFeed.targets index a214c3b52..23fddc46d 100644 --- a/build/publish/PublishNupkgToBlobFeed.targets +++ b/build/publish/PublishNupkgToBlobFeed.targets @@ -17,6 +17,7 @@ ManifestBuildId="$(FullNugetVersion)" ManifestCommit="$(CommitHash)" ManifestName="$(BuildName)" + ManifestBuildData="ProductVersion=$(FullNugetVersion)" Overwrite="true" PublishFlatContainer="false" SkipCreateManifest="$(IsNotOrchestratedPublish)" /> diff --git a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj index 779806a94..4a9a444c4 100644 --- a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj +++ b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj @@ -14,7 +14,7 @@ - + diff --git a/run-build.ps1 b/run-build.ps1 index e7e5f7fb6..c92b91b6d 100644 --- a/run-build.ps1 +++ b/run-build.ps1 @@ -29,14 +29,14 @@ if($Help) # The first 'pass' call to "dotnet msbuild build.proj" has a hard-coded "WriteDynamicPropsToStaticPropsFiles" target # therefore, this call should not have other targets defined. Remove all targets passed in as 'extra parameters'. -$ExtraParametersNoTargets = "" if ($ExtraParameters) { - foreach ($param in $ExtraParameters.split()) + $ExtraParametersNoTargets = $ExtraParameters.GetRange(0,$ExtraParameters.Count) + foreach ($param in $ExtraParameters) { - if((-not $param.StartsWith("/t")) -and (-not $param.StartsWith("/T"))) + if(($param.StartsWith("/t:", [StringComparison]::OrdinalIgnoreCase)) -or ($param.StartsWith("/target:", [StringComparison]::OrdinalIgnoreCase))) { - $ExtraParametersNoTargets += "{0} " -f $param + $ExtraParametersNoTargets.Remove("$param") | Out-Null } } } diff --git a/run-build.sh b/run-build.sh index cce2ed49f..7d383f86f 100755 --- a/run-build.sh +++ b/run-build.sh @@ -130,8 +130,9 @@ done argsnotargets=( ) for arg in ${args[@]} do - if [[ $arg != '/t'* ]] && [[ $arg != '/T'* ]]; then - argsnotargets+=($arg) + arglower="$(echo $arg | awk '{print tolower($0)}')" + if [[ $arglower != '/t:'* ]] && [[ $arglower != '/target:'* ]]; then + argsnotargets+=($arg) fi done