From: Eric Erhardt Date: Mon, 9 Oct 2017 19:09:17 +0000 (-0500) Subject: Merge remote-tracking branch 'upstream/dev/release/2.0.0' X-Git-Tag: submit/tizen/20210909.063632~11032^2~1095^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e5d0a06672ae9de2011bedd2e866533abb600ca;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Merge remote-tracking branch 'upstream/dev/release/2.0.0' Commit migrated from https://github.com/dotnet/core-setup/commit/3119d09f2b974336b20185924e1da828adcd30b0 --- 6e5d0a06672ae9de2011bedd2e866533abb600ca diff --cc src/installer/build.proj index 667eb78,56f52fd..9838df2 --- a/src/installer/build.proj +++ b/src/installer/build.proj @@@ -34,6 -35,46 +35,26 @@@ + + + + + + + + <Project> + <PropertyGroup> + <HostMachineRid>$(HostMachineRid)</HostMachineRid> + </PropertyGroup> + </Project> + + + + + + - - - - - - netstandard1.3 - net451 - - - - - - - - - - diff --cc src/installer/buildpipeline/Core-Setup-Linux-BT.json index 4aa8b3a,c89e75f..342fb22 --- a/src/installer/buildpipeline/Core-Setup-Linux-BT.json +++ b/src/installer/buildpipeline/Core-Setup-Linux-BT.json @@@ -526,96 -526,6 +526,96 @@@ "failOnStandardError": "false" } }, + { + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Initialize docker - Debian 9", + "timeoutInMinutes": 0, + "task": { + "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", + "versionSpec": "1.*", + "definitionType": "task" + }, + "inputs": { + "filename": "$(PB_DockerHost_ToolsDirectory)/scripts/docker/init-docker.sh", + "arguments": "$(DockerImageName_Debian9)", + "workingFolder": "$(PB_DockerHost_Sandbox)", + "failOnStandardError": "false" + } + }, + { + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Init tools - Debian 9 container", + "timeoutInMinutes": 0, + "task": { + "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", + "versionSpec": "1.*", + "definitionType": "task" + }, + "inputs": { + "filename": "docker", + "arguments": "run --rm $(DockerCommonRunArgs_Debian9) /bin/bash -c \"HOME=$(PB_GitDirectory); git clean -X -d -f; $(PB_GitDirectory)/init-tools.sh\"", + "workingFolder": "", + "failOnStandardError": "false" + } + }, + { + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Build traversal build dependencies - Debian 9", + "timeoutInMinutes": 0, + "task": { + "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", + "versionSpec": "1.*", + "definitionType": "task" + }, + "inputs": { + "filename": "docker", - "arguments": "run --rm $(DockerCommonRunArgs_Debian9) $(PB_GitDirectory)/Tools/msbuild.sh $(PB_GitDirectory)/build.proj /t:BuildTraversalBuildDependencies /p:DistroRid=$(DistroRid_Debian9) $(DistroSpecificMSBuildArguments)", ++ "arguments": "run --rm $(DockerCommonRunArgs_Debian9) $(PB_GitDirectory)/Tools/msbuild.sh $(PB_GitDirectory)/build.proj /t:BuildTraversalBuildDependencies $(DistroSpecificMSBuildArguments)", + "workingFolder": "", + "failOnStandardError": "false" + } + }, + { + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Package - Debian 9", + "timeoutInMinutes": 0, + "task": { + "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", + "versionSpec": "1.*", + "definitionType": "task" + }, + "inputs": { + "filename": "docker", - "arguments": "run --rm $(DockerCommonRunArgs_Debian9) $(PB_GitDirectory)/Tools/msbuild.sh $(PB_GitDirectory)/src/pkg/packaging/dir.proj $(AdditionalMSBuildProperties) /p:DistroRid=$(DistroRid_Debian9) $(DistroSpecificMSBuildArguments)", ++ "arguments": "run --rm $(DockerCommonRunArgs_Debian9) $(PB_GitDirectory)/Tools/msbuild.sh $(PB_GitDirectory)/src/pkg/packaging/dir.proj $(AdditionalMSBuildProperties) $(DistroSpecificMSBuildArguments)", + "workingFolder": "", + "failOnStandardError": "false" + } + }, + { + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Publish - Debian 9", + "timeoutInMinutes": 0, + "task": { + "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", + "versionSpec": "1.*", + "definitionType": "task" + }, + "inputs": { + "filename": "docker", - "arguments": "run --rm $(DockerCommonRunArgs_Debian9) $(PB_GitDirectory)/Tools/msbuild.sh $(PB_GitDirectory)/publish/publish.proj /p:DistroRid=$(DistroRid_Debian9) $(DistroSpecificMSBuildArguments) $(DistroSpecificMSBuildPublishArgs)", ++ "arguments": "run --rm $(DockerCommonRunArgs_Debian9) $(PB_GitDirectory)/Tools/msbuild.sh $(PB_GitDirectory)/publish/publish.proj $(DistroSpecificMSBuildArguments) $(DistroSpecificMSBuildPublishArgs)", + "workingFolder": "", + "failOnStandardError": "false" + } + }, { "enabled": true, "continueOnError": false, @@@ -957,10 -866,10 +960,10 @@@ "value": "/flp:v=diag /p:TargetArchitecture=$(PB_TargetArchitecture) /p:PortableBuild=false /p:ConfigurationGroup=$(BuildConfiguration) /p:OSGroup=Linux /p:OfficialBuildId=$(OfficialBuildId)" }, "DistroSpecificMSBuildPublishArgs": { - "value": "/p:AzureAccountName=$(PB_AzureAccountName) /p:AzureAccessToken=$(PB_AzureAccessToken) /p:ChecksumAzureAccountName=$(PB_ChecksumAzureAccountName) /p:ChecksumAzureAccessToken=$(PB_ChecksumAzureAccessToken) /p:DebRepoUser=$(PB_DebRepoUser) /p:DebRepoServer=$(PB_DebRepoServer) /p:DebRepoPass=$(DEB_REPO_PASSWORD) $(PB_DebianKeys)" + "value": "/p:AzureAccountName=$(PB_AzureAccountName) /p:ContainerName=$(PB_ContainerName) /p:AzureAccessToken=$(PB_AzureAccessToken) /p:ChecksumAzureAccountName=$(PB_ChecksumAzureAccountName) /p:ChecksumContainerName=$(PB_ChecksumContainerName) /p:ChecksumAzureAccessToken=$(PB_ChecksumAzureAccessToken) /p:DebRepoUser=$(PB_DebRepoUser) /p:DebRepoServer=$(PB_DebRepoServer) /p:DebRepoPass=$(DEB_REPO_PASSWORD) $(PB_DebianKeys)" }, "PB_DebianKeys": { - "value": "/p:DebianId_ubuntu1404-x64=$(PB_DebianId_ubuntu1404-x64) /p:DebianId_debian8-x64=$(PB_DebianId_debian8-x64) /p:DebianId_ubuntu1604-x64=$(PB_DebianId_ubuntu1604-x64) /p:DebianId_ubuntu1610-x64=$(PB_DebianId_ubuntu1610-x64)" + "value": "/p:DebianId_ubuntu1404-x64=$(PB_DebianId_ubuntu1404-x64) /p:DebianId_debian8-x64=$(PB_DebianId_debian8-x64) /p:DebianId_debian9-x64=$(PB_DebianId_debian9-x64) /p:DebianId_ubuntu1604-x64=$(PB_DebianId_ubuntu1604-x64) /p:DebianId_ubuntu1610-x64=$(PB_DebianId_ubuntu1610-x64)" }, "DockerTag_Ubuntu1404": { "value": "ubuntu-14.04-debpkg-e5cf912-20175003025046" @@@ -1010,18 -907,6 +1001,15 @@@ "DockerCommonRunArgs_Debian8": { "value": "--name $(PB_DockerContainerName)$(DockerTag_Debian8) -v \"$(PB_SourcesDirectory):$(PB_GitDirectory)\" -v $(Build.StagingDirectory)/sharedFrameworkPublish/:/root/sharedFrameworkPublish/ -w=\"$(PB_GitDirectory)\" $(DockerImageName_Debian8)" }, + "DockerTag_Debian9": { + "value": "debian-8.2-debpkg-9f87c3c-20173003023006" + }, - "DistroRid_Debian9": { - "value": "debian.9-$(PB_TargetArchitecture)" - }, + "DockerImageName_Debian9": { + "value": "$(PB_DockerRepository):$(DockerTag_Debian9)" + }, + "DockerCommonRunArgs_Debian9": { + "value": "--name $(PB_DockerContainerName)$(DockerTag_Debian9) -v \"$(PB_SourcesDirectory):$(PB_GitDirectory)\" -v $(Build.StagingDirectory)/sharedFrameworkPublish/:/root/sharedFrameworkPublish/ -w=\"$(PB_GitDirectory)\" $(DockerImageName_Debian9)" + }, "DockerTag_Rhel7": { "value": "rhel-7-rpmpkg-c982313-20174116044113" }, diff --cc src/installer/buildpipeline/Core-Setup-Publish.json index bedc27a,67a8a53..94c9eb8 --- a/src/installer/buildpipeline/Core-Setup-Publish.json +++ b/src/installer/buildpipeline/Core-Setup-Publish.json @@@ -232,7 -117,7 +232,7 @@@ "solution": "$(PB_SourcesDirectory)\\publish\\publish.proj", "platform": "$(PB_TargetArchitecture)", "configuration": "$(BuildConfiguration)", - "msbuildArguments": "/p:Configuration=$(BuildConfiguration) $(PB_CommonMSBuildArgs) /p:SignType=$(PB_SignType) /p:NuGetFeedUrl=$(NUGET_FEED_URL) /p:NuGetSymbolsFeedUrl=$(NUGET_SYMBOLS_FEED_URL) /p:NuGetApiKey=$(NUGET_API_KEY) /p:AzureAccountName=$(PB_AzureAccountName) /p:AzureAccessToken=$(PB_AzureAccessToken) /p:ChecksumAzureAccountName=$(PB_ChecksumAzureAccountName) /p:ChecksumAzureAccessToken=$(PB_ChecksumAzureAccessToken) /p:GitHubUser=$(PB_GitHubUser) /p:GitHubEmail=$(PB_GitHubEmail) /p:GitHubAuthToken=$(GITHUB_PASSWORD) /p:VersionsRepoOwner=$(PB_VersionsRepoOwner) /p:VersionsRepo=$(PB_VersionsRepo) /p:VersionsRepoPath=build-info/dotnet/$(PB_RepoName)/$(SourceBranch) /p:Finalize=true /p:DotNetToolDir=$(DotNetToolDir) /p:EmbedIndexToolDir=$(EmbedIndexToolDir) /flp:v=detailed;LogFile=$(PB_SourcesDirectory)\\publish.log", - "msbuildArguments": "/p:Configuration=$(BuildConfiguration) $(PB_CommonMSBuildArgs) /p:NuGetFeedUrl=$(NUGET_FEED_URL) /p:NuGetSymbolsFeedUrl=$(NUGET_SYMBOLS_FEED_URL) /p:NuGetApiKey=$(NUGET_API_KEY) /p:AzureAccountName=$(PB_AzureAccountName) /p:ContainerName=$(PB_ContainerName) /p:AzureAccessToken=$(PB_AzureAccessToken) /p:ChecksumAzureAccountName=$(PB_ChecksumAzureAccountName) /p:ChecksumContainerName=$(PB_ChecksumContainerName) /p:ChecksumAzureAccessToken=$(PB_ChecksumAzureAccessToken) /p:GitHubUser=$(PB_GitHubUser) /p:GitHubEmail=$(PB_GitHubEmail) /p:GitHubAuthToken=$(GITHUB_PASSWORD) /p:VersionsRepoOwner=$(PB_VersionsRepoOwner) /p:VersionsRepo=$(PB_VersionsRepo) /p:VersionsRepoPath=build-info/dotnet/$(PB_RepoName)/$(SourceBranch) /p:Finalize=true /flp:v=detailed;LogFile=$(PB_SourcesDirectory)\\publish.log", ++ "msbuildArguments": "/p:Configuration=$(BuildConfiguration) $(PB_CommonMSBuildArgs) /p:SignType=$(PB_SignType) /p:NuGetFeedUrl=$(NUGET_FEED_URL) /p:NuGetSymbolsFeedUrl=$(NUGET_SYMBOLS_FEED_URL) /p:NuGetApiKey=$(NUGET_API_KEY) /p:AzureAccountName=$(PB_AzureAccountName) /p:ContainerName=$(PB_ContainerName) /p:AzureAccessToken=$(PB_AzureAccessToken) /p:ChecksumAzureAccountName=$(PB_ChecksumAzureAccountName) /p:ChecksumContainerName=$(PB_ChecksumContainerName) /p:ChecksumAzureAccessToken=$(PB_ChecksumAzureAccessToken) /p:GitHubUser=$(PB_GitHubUser) /p:GitHubEmail=$(PB_GitHubEmail) /p:GitHubAuthToken=$(GITHUB_PASSWORD) /p:VersionsRepoOwner=$(PB_VersionsRepoOwner) /p:VersionsRepo=$(PB_VersionsRepo) /p:VersionsRepoPath=build-info/dotnet/$(PB_RepoName)/$(SourceBranch) /p:Finalize=true /p:DotNetToolDir=$(DotNetToolDir) /p:EmbedIndexToolDir=$(EmbedIndexToolDir) /flp:v=detailed;LogFile=$(PB_SourcesDirectory)\\publish.log", "clean": "false", "maximumCpuCount": "false", "restoreNugetPackages": "false", diff --cc src/installer/buildpipeline/Core-Setup-Windows-Arm-BT.json index dc0a4f9,f063520..6437f8c --- a/src/installer/buildpipeline/Core-Setup-Windows-Arm-BT.json +++ b/src/installer/buildpipeline/Core-Setup-Windows-Arm-BT.json @@@ -445,12 -391,8 +445,8 @@@ "CertificateId": { "value": "400" }, - "PB_DistroRid": { - "value": "win-$(PB_TargetArchitecture)", - "allowOverride": true - }, "MsbuildSigningArguments": { - "value": "/p:CertificateId=$(CertificateId) /v:detailed" + "value": "/p:CertificateId=$(CertificateId) /v:detailed /p:SignType=$(PB_SignType)" }, "TeamName": { "value": "DotNetCore" @@@ -497,11 -444,10 +499,11 @@@ "value": "HEAD" }, "PB_SignType": { - "value": "real" + "value": "real", + "allowOverride": true }, "PB_CommonMSBuildArgs": { - "value": "/p:DistroRid=$(PB_DistroRid) /p:ConfigurationGroup=$(BuildConfiguration) /p:TargetArchitecture=$(PB_TargetArchitecture) /p:PortableBuild=$(PB_PortableBuild) /p:DisableCrossgen=true $(PB_AdditionalBuildArguments)" + "value": "/p:ConfigurationGroup=$(BuildConfiguration) /p:TargetArchitecture=$(PB_TargetArchitecture) /p:PortableBuild=$(PB_PortableBuild) /p:DisableCrossgen=true $(PB_AdditionalBuildArguments)" }, "PB_AdditionalBuildArguments": { "value": "" diff --cc src/installer/buildpipeline/Core-Setup-Windows-BT.json index dc50ac9,77ee222..98cb1fd --- a/src/installer/buildpipeline/Core-Setup-Windows-BT.json +++ b/src/installer/buildpipeline/Core-Setup-Windows-BT.json @@@ -480,7 -426,7 +480,7 @@@ "msbuildLocation": "", "platform": "$(PB_TargetArchitecture)", "configuration": "$(BuildConfiguration)", - "msbuildArguments": "$(PB_CommonMSBuildArgs) /p:AzureAccountName=$(PB_AzureAccountName) /p:AzureAccessToken=$(PB_AzureAccessToken) /p:PublishRidAgnosticPackages=$(PB_PublishRidAgnosticPackages) /p:BuildFullPlatformManifest=$(PB_BuildFullPlatformManifest) /p:ChecksumAzureAccountName=$(PB_ChecksumAzureAccountName) /p:ChecksumAzureAccessToken=$(PB_ChecksumAzureAccessToken) /flp:v=detailed;LogFile=$(PB_SourcesDirectory)\\publish.log", - "msbuildArguments": "$(PB_CommonMSBuildArgs) /p:AzureAccountName=$(PB_AzureAccountName) /p:ContainerName=$(PB_ContainerName) /p:AzureAccessToken=$(PB_AzureAccessToken) /p:PublishRidAgnosticPackages=$(PB_PublishRidAgnosticPackages) /p:BuildFullPlatformManifest=$(PB_BuildFullPlatformManifest) /p:ChecksumAzureAccountName=$(PB_ChecksumAzureAccountName) /p:ChecksumContainerName=$(PB_ChecksumContainerName) /p:ChecksumAzureAccessToken=$(PB_ChecksumAzureAccessToken) /flp:v=detailed;LogFile=$(PB_SourcesDirectory)\\publish.log", ++ "msbuildArguments": "$(PB_CommonMSBuildArgs) /p:AzureAccountName=$(PB_AzureAccountName) /p:ContainerName=$(PB_ContainerName) /p:AzureAccessToken=$(PB_AzureAccessToken) /p:PublishRidAgnosticPackages=$(PB_PublishRidAgnosticPackages) /p:BuildFullPlatformManifest=$(PB_BuildFullPlatformManifest) /p:ChecksumAzureAccountName=$(PB_ChecksumAzureAccountName) p:ChecksumContainerName=$(PB_ChecksumContainerName) /p:ChecksumAzureAccessToken=$(PB_ChecksumAzureAccessToken) /flp:v=detailed;LogFile=$(PB_SourcesDirectory)\\publish.log", "clean": "false", "maximumCpuCount": "false", "restoreNugetPackages": "false", @@@ -644,43 -611,44 +644,49 @@@ "PB_AzureAccountName": { "value": "sourcebuild" }, + "PB_ContainerName": { + "value": "dotnet" + }, - "PB_AzureAccessToken": { + "PB_Branch": { + "value": "master", + "allowOverride": true + }, + "PB_BuildFullPlatformManifest": { + "value": "false" + }, + "PB_ChecksumAzureAccessToken": { "value": null, "isSecret": true }, "PB_ChecksumAzureAccountName": { "value": "dotnetclichecksums" }, + "PB_ChecksumContainerName": { + "value": "dotnet" + }, - "PB_ChecksumAzureAccessToken": { - "value": null, - "isSecret": true + "PB_CleanAgent": { + "value": "true" }, - "PB_VsoAccountName": { - "value": "dn-bot" + "PB_CommonMSBuildArgs": { + "value": "/p:DistroRid=$(PB_DistroRid) /p:ConfigurationGroup=$(BuildConfiguration) /p:TargetArchitecture=$(PB_TargetArchitecture) /p:PortableBuild=$(PB_PortableBuild)" }, - "PB_VsoPassword": { - "value": null, - "isSecret": true + "PB_DistroRid": { + "value": "win-$(PB_TargetArchitecture)", + "allowOverride": true }, - "PB_Branch": { - "value": "master" + "PB_PortableBuild": { + "value": "true", + "allowOverride": true }, - "SourceVersion": { - "value": "HEAD" + "PB_PublishRidAgnosticPackages": { + "value": "false" }, "PB_SignType": { - "value": "real" - }, - "PB_CommonMSBuildArgs": { - "value": "/p:ConfigurationGroup=$(BuildConfiguration) /p:TargetArchitecture=$(PB_TargetArchitecture) /p:PortableBuild=$(PB_PortableBuild)" + "value": "real", + "allowOverride": true }, - "OfficialBuildId": { - "value": "$(Build.BuildNumber)" + "PB_SourcesDirectory": { + "value": "$(Build.SourcesDirectory)\\core-setup" }, "PB_TargetArchitecture": { "value": "x64", diff --cc src/installer/init-tools.sh index d6a6013,c73c1d9..3c1a0a7 --- a/src/installer/init-tools.sh +++ b/src/installer/init-tools.sh @@@ -12,126 -12,109 +12,116 @@@ __BUILD_TOOLS_PACKAGE_VERSION=$(cat $__ __DOTNET_TOOLS_VERSION=$(cat $__scriptpath/DotnetCLIVersion.txt) __BUILD_TOOLS_PATH=$__PACKAGES_DIR/microsoft.dotnet.buildtools/$__BUILD_TOOLS_PACKAGE_VERSION/lib __INIT_TOOLS_RESTORE_PROJECT=$__scriptpath/init-tools.msbuild - __INIT_TOOLS_DONE_MARKER_DIR=$__TOOLRUNTIME_DIR/$__BUILD_TOOLS_PACKAGE_VERSION - __INIT_TOOLS_DONE_MARKER=$__INIT_TOOLS_DONE_MARKER_DIR/done + __BUILD_TOOLS_SEMAPHORE=$__TOOLRUNTIME_DIR/$__BUILD_TOOLS_PACKAGE_VERSION/init-tools.complete - # We do not want to run the first-time experience. - export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 + if [ -e $__BUILD_TOOLS_SEMAPHORE ]; then + echo "Tools are already initialized" + return #return instead of exit because this script is inlined in other scripts which we don't want to exit + fi + + if [ -e $__TOOLRUNTIME_DIR ]; then rm -rf -- $__TOOLRUNTIME_DIR; fi - if [ -z "$__DOTNET_PKG" ]; then - if [ "$(uname -m | grep "i[3456]86")" = "i686" ]; then - echo "Warning: build not supported on 32 bit Unix" + if [ -d "$DotNetBuildToolsDir" ]; then + echo "Using tools from '$DotNetBuildToolsDir'." + ln -s "$DotNetBuildToolsDir" "$__TOOLRUNTIME_DIR" + + if [ ! -e "$__DOTNET_CMD" ]; then + echo "ERROR: Ensure that $DotNetBuildToolsDir contains the .NET Core SDK at $__DOTNET_PATH" + exit 1 fi - OSName=$(uname -s) - case $OSName in - Darwin) - OS=OSX - __DOTNET_PKG=dotnet-dev-osx-x64 - ulimit -n 2048 - ;; - - Linux) - __DOTNET_PKG=dotnet-dev-linux-x64 - OS=Linux - - if [ -e /etc/os-release ]; then - source /etc/os-release - if [[ $ID == "alpine" ]]; then - # remove the last version digit - VERSION_ID=${VERSION_ID%.*} - __DOTNET_PKG=dotnet-dev-alpine.$VERSION_ID-x64 - fi - elif [ -e /etc/redhat-release ]; then - redhatRelease=$( $__init_tools_log - - if [ ! -e $__DOTNET_PATH ]; then - - mkdir -p "$__DOTNET_PATH" - - if [ -n "$DOTNET_TOOLSET_DIR" ] && [ -d "$DOTNET_TOOLSET_DIR/$__DOTNET_TOOLS_VERSION" ]; then - echo "Copying $DOTNET_TOOLSET_DIR/$__DOTNET_TOOLS_VERSION to $__DOTNET_PATH" >> $__init_tools_log - cp -r $DOTNET_TOOLSET_DIR/$__DOTNET_TOOLS_VERSION/* $__DOTNET_PATH - elif [ -n "$DOTNET_TOOL_DIR" ] && [ -d "$DOTNET_TOOL_DIR" ]; then - echo "Copying $DOTNET_TOOL_DIR to $__DOTNET_PATH" >> $__init_tools_log - cp -r $DOTNET_TOOL_DIR/* $__DOTNET_PATH - else - echo "Installing dotnet cli..." - __DOTNET_LOCATION="https://dotnetcli.azureedge.net/dotnet/Sdk/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.${__DOTNET_TOOLS_VERSION}.tar.gz" - # curl has HTTPS CA trust-issues less often than wget, so lets try that first. - echo "Installing '${__DOTNET_LOCATION}' to '$__DOTNET_PATH/dotnet.tar'" >> $__init_tools_log - which curl > /dev/null 2> /dev/null - if [ $? -ne 0 ]; then - wget -q -O $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION} - else - curl --retry 10 -sSL --create-dirs -o $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION} - fi - cd $__DOTNET_PATH - tar -xf $__DOTNET_PATH/dotnet.tar - - cd $__scriptpath - - __PATCH_CLI_NUGET_FRAMEWORKS=1 + echo "Running: $__scriptpath/init-tools.sh" > $__init_tools_log + + if [ ! -e $__DOTNET_PATH ]; then + if [ -z "$__DOTNET_PKG" ]; then + if [ "$(uname -m | grep "i[3456]86")" = "i686" ]; then + echo "Warning: build not supported on 32 bit Unix" fi + OSName=$(uname -s) + case $OSName in + Darwin) + OS=OSX + __DOTNET_PKG=dotnet-dev-osx-x64 + ulimit -n 2048 + ;; + - Linux) - __DOTNET_PKG=dotnet-dev-linux-x64 - OS=Linux ++ Linux) ++ __DOTNET_PKG=dotnet-dev-linux-x64 ++ OS=Linux + - if [ -e /etc/redhat-release ]; then - redhatRelease=$(> $__init_tools_log - cp -r $BUILD_TOOLS_TOOLSET_DIR/$__BUILD_TOOLS_PACKAGE_VERSION/* $__TOOLRUNTIME_DIR - elif [ -n "$BUILD_TOOLS_TOOL_DIR" ] && [ -d "$BUILD_TOOLS_TOOL_DIR" ]; then - echo "Copying $BUILD_TOOLS_TOOL_DIR to $__TOOLRUNTIME_DIR" >> $__init_tools_log - cp -r $BUILD_TOOLS_TOOL_DIR/* $__TOOLRUNTIME_DIR + echo "Installing dotnet cli..." + __DOTNET_LOCATION="https://dotnetcli.azureedge.net/dotnet/Sdk/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.${__DOTNET_TOOLS_VERSION}.tar.gz" + # curl has HTTPS CA trust-issues less often than wget, so lets try that first. + echo "Installing '${__DOTNET_LOCATION}' to '$__DOTNET_PATH/dotnet.tar'" >> $__init_tools_log + which curl > /dev/null 2> /dev/null + if [ $? -ne 0 ]; then + wget -q -O $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION} else - if [ ! -e $__BUILD_TOOLS_PATH ]; then - echo "Restoring BuildTools version $__BUILD_TOOLS_PACKAGE_VERSION..." - echo "Running: $__DOTNET_CMD restore \"$__INIT_TOOLS_RESTORE_PROJECT\" --no-cache --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE /p:BuildToolsPackageVersion=$__BUILD_TOOLS_PACKAGE_VERSION" >> $__init_tools_log - $__DOTNET_CMD restore "$__INIT_TOOLS_RESTORE_PROJECT" --no-cache --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE /p:BuildToolsPackageVersion=$__BUILD_TOOLS_PACKAGE_VERSION >> $__init_tools_log - if [ ! -e "$__BUILD_TOOLS_PATH/init-tools.sh" ]; then echo "ERROR: Could not restore build tools correctly. See '$__init_tools_log' for more details."1>&2; fi - fi - - echo "Initializing BuildTools..." - echo "Running: $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR" >> $__init_tools_log - - # Executables restored with .NET Core 2.0 do not have executable permission flags. https://github.com/NuGet/Home/issues/4424 - chmod +x $__BUILD_TOOLS_PATH/init-tools.sh - $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR >> $__init_tools_log - if [ "$?" != "0" ]; then - echo "ERROR: An error occured when trying to initialize the tools. Please check '$__init_tools_log' for more details."1>&2 - exit 1 - fi + curl --retry 10 -sSL --create-dirs -o $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION} fi + cd $__DOTNET_PATH + tar -xf $__DOTNET_PATH/dotnet.tar - echo "Making all .sh files executable under Tools." - # Executables restored with .NET Core 2.0 do not have executable permission flags. https://github.com/NuGet/Home/issues/4424 - ls $__scriptpath/Tools/*.sh | xargs chmod +x - ls $__scriptpath/Tools/scripts/docker/*.sh | xargs chmod +x + cd $__scriptpath + fi - Tools/crossgen.sh $__scriptpath/Tools + if [ ! -e $__BUILD_TOOLS_PATH ]; then + echo "Restoring BuildTools version $__BUILD_TOOLS_PACKAGE_VERSION..." + echo "Running: $__DOTNET_CMD restore \"$__INIT_TOOLS_RESTORE_PROJECT\" --no-cache --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE /p:BuildToolsPackageVersion=$__BUILD_TOOLS_PACKAGE_VERSION" >> $__init_tools_log + $__DOTNET_CMD restore "$__INIT_TOOLS_RESTORE_PROJECT" --no-cache --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE /p:BuildToolsPackageVersion=$__BUILD_TOOLS_PACKAGE_VERSION >> $__init_tools_log + if [ ! -e "$__BUILD_TOOLS_PATH/init-tools.sh" ]; then echo "ERROR: Could not restore build tools correctly. See '$__init_tools_log' for more details."1>&2; fi + fi - mkdir -p $__INIT_TOOLS_DONE_MARKER_DIR - touch $__INIT_TOOLS_DONE_MARKER + echo "Initializing BuildTools..." + echo "Running: $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR" >> $__init_tools_log - echo "Done initializing tools." - else - echo "Tools are already initialized" + # Executables restored with .NET Core 2.0 do not have executable permission flags. https://github.com/NuGet/Home/issues/4424 + chmod +x $__BUILD_TOOLS_PATH/init-tools.sh + $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR >> $__init_tools_log + if [ "$?" != "0" ]; then + echo "ERROR: An error occured when trying to initialize the tools. Please check '$__init_tools_log' for more details."1>&2 + exit 1 fi + + echo "Making all .sh files executable under Tools." + # Executables restored with .NET Core 2.0 do not have executable permission flags. https://github.com/NuGet/Home/issues/4424 + ls $__scriptpath/Tools/*.sh | xargs chmod +x + ls $__scriptpath/Tools/scripts/docker/*.sh | xargs chmod +x + + Tools/crossgen.sh $__scriptpath/Tools + + mkdir -p "$(dirname "$__BUILD_TOOLS_SEMAPHORE")" && touch $__BUILD_TOOLS_SEMAPHORE + + echo "Done initializing tools." + diff --cc src/installer/pkg/packaging/dir.proj index 8e6d2cf,09df4c6..4b78974 --- a/src/installer/pkg/packaging/dir.proj +++ b/src/installer/pkg/packaging/dir.proj @@@ -164,8 -164,14 +164,10 @@@ - - false - - + + diff --cc src/installer/pkg/projects/Microsoft.NETCore.App/src/Microsoft.NETCore.App.depproj index d3ec683,f641c47..f70af0e --- a/src/installer/pkg/projects/Microsoft.NETCore.App/src/Microsoft.NETCore.App.depproj +++ b/src/installer/pkg/projects/Microsoft.NETCore.App/src/Microsoft.NETCore.App.depproj @@@ -4,12 -4,12 +4,12 @@@ unused - unused - .NETCoreApp,Version=v2.0 - netcoreapp2.0 - netcoreapp2.0 + .NETCoreApp,Version=v2.1 + netcoreapp2.1 + netcoreapp2.1 Microsoft.Private.CoreFx.NETCoreApp $(CrossGenRootPath)/$(MSBuildProjectName)/$(NuGetRuntimeIdentifier) true diff --cc src/installer/pkg/projects/Microsoft.NETCore.UniversalWindowsPlatform/src/Microsoft.NETCore.UniversalWindowsPlatform.depproj index 1c15ed1,2aa94ec..e90b346 --- a/src/installer/pkg/projects/Microsoft.NETCore.UniversalWindowsPlatform/src/Microsoft.NETCore.UniversalWindowsPlatform.depproj +++ b/src/installer/pkg/projects/Microsoft.NETCore.UniversalWindowsPlatform/src/Microsoft.NETCore.UniversalWindowsPlatform.depproj @@@ -4,12 -4,12 +4,12 @@@ unused - unused - UAP,Version=v10.1 - uap10.1 - uap10.1 + $(UAPvNextTFMFull) + $(UAPvNextTFM) + $(UAPvNextTFM) Microsoft.Private.CoreFx.UAP true true diff --cc src/installer/publish/dir.props index 562b416,5b34dc5..2afbc8f --- a/src/installer/publish/dir.props +++ b/src/installer/publish/dir.props @@@ -9,25 -12,8 +9,20 @@@ Runtime/$(ProductVersion) .sha512 - - - $(DistroRid).$(SharedFrameworkNugetVersion) - $(DistroRid).$(HostResolverVersion) - + + + Pushing took too long + + + + $(BinariesRelativePath) diff --cc src/installer/publish/publish.proj index 91a3150,9067495..082fc3d --- a/src/installer/publish/publish.proj +++ b/src/installer/publish/publish.proj @@@ -12,11 -11,21 +12,21 @@@ - - + DependsOnTargets="PublishCoreHostPackagesToFeed;FinalizeBuildInAzure;UpdateVersionsRepo" /> + + + + + - + @@@ -135,9 -149,8 +150,9 @@@ + Condition="'@(_MissingBlobNames)' == '' AND '$(NuGetFeedUrl)' != ''"> + @@@ -217,18 -191,15 +232,17 @@@ $(DotnetToolCommand) nuget push --source $(NuGetSymbolsFeedUrl) --api-key $(NuGetApiKey) --timeout $(NuGetPushTimeoutSeconds) - - + - + - + - + Condition="'$(PublishDebToolToFeed)' == 'true' AND '$(CliNuGetFeedUrl)' != ''"> diff --cc src/installer/signing/sign.proj index 3f34ba6,c9daef6..925ae26 --- a/src/installer/signing/sign.proj +++ b/src/installer/signing/sign.proj @@@ -7,11 -7,11 +7,11 @@@ - - + + - +