From c9956137c4463af851f88abe01f5f6a2446fec63 Mon Sep 17 00:00:00 2001 From: adaggarwal Date: Tue, 15 Oct 2019 15:48:51 +0000 Subject: [PATCH 01/19] directly call darc-init --- tools-local/init-build.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools-local/init-build.proj b/tools-local/init-build.proj index fb8faec181..3ad144b5f9 100644 --- a/tools-local/init-build.proj +++ b/tools-local/init-build.proj @@ -155,7 +155,7 @@ - + From 708d09f90262735f241837d792079eeafa42c5c7 Mon Sep 17 00:00:00 2001 From: adaggarwal Date: Tue, 15 Oct 2019 19:57:05 +0000 Subject: [PATCH 02/19] add runtime to support darc, add tools-path, remove un-needed projects --- build.sh | 3 +++ dir.props | 2 +- eng/common/darc-init.sh | 9 ++++----- tools-local/ILAsmVersion.txt | 1 - tools-local/ildasm.depproj | 25 ------------------------- 5 files changed, 8 insertions(+), 32 deletions(-) delete mode 100644 tools-local/ILAsmVersion.txt delete mode 100644 tools-local/ildasm.depproj diff --git a/build.sh b/build.sh index c0f3f849ed..da0b8bd56f 100755 --- a/build.sh +++ b/build.sh @@ -69,6 +69,9 @@ export NUGET_PACKAGES="$scriptroot/packages/restored/" set -x scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" +# runtime 2.1.0 required for darc +"$scriptroot/eng/common/dotnet-install.sh" -runtime dotnet -version 2.1.0 + if [ "$alternateTarget" == "true" ]; then CLIPATH="$scriptroot/.dotnet" SDKPATH="$CLIPATH/sdk/$SDK_VERSION" diff --git a/dir.props b/dir.props index d5ace26e73..73468c62f4 100644 --- a/dir.props +++ b/dir.props @@ -58,7 +58,7 @@ $(ToolsDir)source-built/ $(ProjectDir)tools-local/ $(ToolsLocalDir)tasks/ - $(ToolsLocalDir)arcade-services/artifacts/bin/Microsoft.DotNet.Darc/Release/netcoreapp3.0/Microsoft.DotNet.Darc.dll + $(DotNetCliToolDir)tools/.store/microsoft.dotnet.darc/1.1.0-beta.19502.3/microsoft.dotnet.darc/1.1.0-beta.19502.3/tools/netcoreapp2.1/any/Microsoft.DotNet.Darc.dll $(TaskDirectory)Microsoft.DotNet.SourceBuild.Tasks/bin/Debug/netstandard2.0/ $(TasksBinDir)Microsoft.DotNet.SourceBuild.Tasks.dll $(TaskDirectory)Microsoft.DotNet.SourceBuild.Tasks.XPlat/bin/Debug/netstandard2.0/ diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh index abdd0bc05a..3e67ae5d2f 100755 --- a/eng/common/darc-init.sh +++ b/eng/common/darc-init.sh @@ -49,16 +49,15 @@ function InstallDarcCli { local dotnet_root=$_InitializeDotNetCli local uninstall_command=`$dotnet_root/dotnet tool uninstall $darc_cli_package_name -g` - local tool_list=$($dotnet_root/dotnet tool list -g) + local tool_list=$($dotnet_root/dotnet tool list --tool-path $dotnet_root/tools) if [[ $tool_list = *$darc_cli_package_name* ]]; then - echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g) + echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name --tool-path $dotnet_root/tools) fi local arcadeServicesSource="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" - - echo "Installing Darc CLI version $darcVersion..." + echo "Installing Darc CLI version $darcVersion in $dotnet_root/tools..." echo "You may need to restart your command shell if this is the first dotnet tool you have installed." - echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g) + echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path $dotnet_root/tools --framework netcoreapp3.0) } InstallDarcCli diff --git a/tools-local/ILAsmVersion.txt b/tools-local/ILAsmVersion.txt deleted file mode 100644 index 81d08ab56a..0000000000 --- a/tools-local/ILAsmVersion.txt +++ /dev/null @@ -1 +0,0 @@ -3.0.0-preview1-26623-01 diff --git a/tools-local/ildasm.depproj b/tools-local/ildasm.depproj deleted file mode 100644 index 77411a38df..0000000000 --- a/tools-local/ildasm.depproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - - false - - - - - - - - - - - .NETCoreApp,Version=v2.0 - netcoreapp2.0 - true - - - - - - - From aa935778860e5ffaa263b3b8fdf60e31849445cb Mon Sep 17 00:00:00 2001 From: adaggarwal Date: Tue, 15 Oct 2019 20:57:08 +0000 Subject: [PATCH 03/19] Use the latest darc version --- dir.props | 3 ++- tools-local/init-build.proj | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dir.props b/dir.props index 73468c62f4..4025254d8e 100644 --- a/dir.props +++ b/dir.props @@ -58,7 +58,8 @@ $(ToolsDir)source-built/ $(ProjectDir)tools-local/ $(ToolsLocalDir)tasks/ - $(DotNetCliToolDir)tools/.store/microsoft.dotnet.darc/1.1.0-beta.19502.3/microsoft.dotnet.darc/1.1.0-beta.19502.3/tools/netcoreapp2.1/any/Microsoft.DotNet.Darc.dll + 1.1.0-beta.19510.3 + $(DotNetCliToolDir)tools/.store/microsoft.dotnet.darc/$(DarcVersion)/microsoft.dotnet.darc/$(DarcVersion)/tools/netcoreapp2.1/any/Microsoft.DotNet.Darc.dll $(TaskDirectory)Microsoft.DotNet.SourceBuild.Tasks/bin/Debug/netstandard2.0/ $(TasksBinDir)Microsoft.DotNet.SourceBuild.Tasks.dll $(TaskDirectory)Microsoft.DotNet.SourceBuild.Tasks.XPlat/bin/Debug/netstandard2.0/ diff --git a/tools-local/init-build.proj b/tools-local/init-build.proj index 3ad144b5f9..1042861a44 100644 --- a/tools-local/init-build.proj +++ b/tools-local/init-build.proj @@ -155,7 +155,7 @@ - + From 4dc127286a9e026c9e254067bbf485bca6d81e10 Mon Sep 17 00:00:00 2001 From: adaggarwal Date: Tue, 15 Oct 2019 21:06:01 +0000 Subject: [PATCH 04/19] wip --- dir.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dir.props b/dir.props index 4025254d8e..a0d5deddb8 100644 --- a/dir.props +++ b/dir.props @@ -58,7 +58,7 @@ $(ToolsDir)source-built/ $(ProjectDir)tools-local/ $(ToolsLocalDir)tasks/ - 1.1.0-beta.19510.3 + 1.1.0-beta.19515.3 $(DotNetCliToolDir)tools/.store/microsoft.dotnet.darc/$(DarcVersion)/microsoft.dotnet.darc/$(DarcVersion)/tools/netcoreapp2.1/any/Microsoft.DotNet.Darc.dll $(TaskDirectory)Microsoft.DotNet.SourceBuild.Tasks/bin/Debug/netstandard2.0/ $(TasksBinDir)Microsoft.DotNet.SourceBuild.Tasks.dll From 55be598058d6e1d22415bc6650384f3b279f77c6 Mon Sep 17 00:00:00 2001 From: adaggarwal Date: Tue, 15 Oct 2019 21:18:14 +0000 Subject: [PATCH 05/19] remove darc and dependent stuff from tarball --- build-source-tarball.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-source-tarball.sh b/build-source-tarball.sh index b34dc56b91..2288ce35b8 100755 --- a/build-source-tarball.sh +++ b/build-source-tarball.sh @@ -192,6 +192,9 @@ cp -r $SCRIPT_ROOT/scripts $TARBALL_ROOT/ cp -r $SCRIPT_ROOT/repos $TARBALL_ROOT/ cp -r $SCRIPT_ROOT/tools-local $TARBALL_ROOT/ rm -rf $TARBALL_ROOT/tools-local/arcade-services/ +rm -rf $TARBALL_ROOT/.dotnet/shared/2.1.0/ +rm -rf $TARBALL_ROOT/.dotnet/tools/ +rm -rf $TARBALL_ROOT/.dotnet/host/fxr/2.1.0/ cp -r $SCRIPT_ROOT/bin/git-info $TARBALL_ROOT/ cp $SCRIPT_ROOT/support/tarball/build.sh $TARBALL_ROOT/build.sh From a5aa9df18a8a2edc197c897b8ca7721a1393a1c5 Mon Sep 17 00:00:00 2001 From: adaggarwal Date: Tue, 15 Oct 2019 21:50:27 +0000 Subject: [PATCH 06/19] test: experimental --- build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sh b/build.sh index da0b8bd56f..4817c7d1f8 100755 --- a/build.sh +++ b/build.sh @@ -65,6 +65,7 @@ export DOTNET_CLI_TELEMETRY_OPTOUT=1 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 export DOTNET_MULTILEVEL_LOOKUP=0 export NUGET_PACKAGES="$scriptroot/packages/restored/" +export LD_DEBUG=1 set -x scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" From b8ecf18f84e4561b14da799f7fe131e9785b87cf Mon Sep 17 00:00:00 2001 From: adaggarwal Date: Tue, 15 Oct 2019 22:12:26 +0000 Subject: [PATCH 07/19] test: experimental --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 4817c7d1f8..979ae009fb 100755 --- a/build.sh +++ b/build.sh @@ -65,7 +65,7 @@ export DOTNET_CLI_TELEMETRY_OPTOUT=1 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 export DOTNET_MULTILEVEL_LOOKUP=0 export NUGET_PACKAGES="$scriptroot/packages/restored/" -export LD_DEBUG=1 +export LD_DEBUG=all set -x scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" From 0cf3b272dab47bd669bb3927eb4f4989b6c13a42 Mon Sep 17 00:00:00 2001 From: adaggarwal Date: Wed, 16 Oct 2019 15:29:32 +0000 Subject: [PATCH 08/19] remove extra stuff from tarball --- build-source-tarball.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-source-tarball.sh b/build-source-tarball.sh index 2288ce35b8..dae8895606 100755 --- a/build-source-tarball.sh +++ b/build-source-tarball.sh @@ -79,7 +79,8 @@ if [[ $sdkLine =~ $sdkPattern ]]; then fi echo "Found bootstrap SDK $SDK_VERSION" CLI_PATH="$SCRIPT_ROOT/.dotnet" -DARC_DLL="$SCRIPT_ROOT/tools-local/arcade-services/artifacts/bin/Microsoft.DotNet.Darc/Release/netcoreapp3.0/Microsoft.DotNet.Darc.dll" +DarcVersion=1.1.0-beta.19515.3 +DARC_DLL="$CLI_PATH/tools/.store/microsoft.dotnet.darc/$DarcVersion/microsoft.dotnet.darc/$DarcVersion/tools/netcoreapp2.1/any/Microsoft.DotNet.Darc.dll" if [ $SKIP_BUILD -ne 1 ]; then From c35ad46b61775ec3abd51f9db2d5f6e9bfc7fb40 Mon Sep 17 00:00:00 2001 From: adaggarwal Date: Wed, 16 Oct 2019 18:03:42 +0000 Subject: [PATCH 09/19] wip --- build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sh b/build.sh index 979ae009fb..83dbefd831 100755 --- a/build.sh +++ b/build.sh @@ -66,6 +66,7 @@ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 export DOTNET_MULTILEVEL_LOOKUP=0 export NUGET_PACKAGES="$scriptroot/packages/restored/" export LD_DEBUG=all +export LD_DEBUG_OUTPUT="$scriptroot/DEBUG.log" set -x scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" From e181585680e6812455b95fcb147d2d097b308eca Mon Sep 17 00:00:00 2001 From: adaggarwal Date: Wed, 16 Oct 2019 19:49:32 +0000 Subject: [PATCH 10/19] update to fedora30 --- .vsts.pipelines/builds/matrix.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vsts.pipelines/builds/matrix.yml b/.vsts.pipelines/builds/matrix.yml index 9650c34c29..2c4a1fafdb 100644 --- a/.vsts.pipelines/builds/matrix.yml +++ b/.vsts.pipelines/builds/matrix.yml @@ -31,8 +31,8 @@ jobs: - template: ../jobs/ci-linux.yml parameters: - job: fedora29 - imageName: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-98b4f89-20190506161422 + job: fedora30 + imageName: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-30-39ec319-20190806171718 matrix: Production: {} Online: { type: Online } From 1114df37488ae4b1333a74ddeed5e94714c96ac3 Mon Sep 17 00:00:00 2001 From: adaggarwal Date: Wed, 16 Oct 2019 23:43:14 +0000 Subject: [PATCH 11/19] wip --- build.sh | 2 -- tools-local/init-build.proj | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 83dbefd831..da0b8bd56f 100755 --- a/build.sh +++ b/build.sh @@ -65,8 +65,6 @@ export DOTNET_CLI_TELEMETRY_OPTOUT=1 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 export DOTNET_MULTILEVEL_LOOKUP=0 export NUGET_PACKAGES="$scriptroot/packages/restored/" -export LD_DEBUG=all -export LD_DEBUG_OUTPUT="$scriptroot/DEBUG.log" set -x scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" diff --git a/tools-local/init-build.proj b/tools-local/init-build.proj index 1042861a44..7b7e4d679d 100644 --- a/tools-local/init-build.proj +++ b/tools-local/init-build.proj @@ -183,7 +183,7 @@ $(DotNetCliToolDir)dotnet $(DarcDll) $(DarcCloneArguments) - + From b0e3e7cfa886176da8623587a8a1582a1d079d27 Mon Sep 17 00:00:00 2001 From: adaggarwal Date: Thu, 17 Oct 2019 18:10:07 +0000 Subject: [PATCH 12/19] wip --- .vsts.pipelines/builds/matrix.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vsts.pipelines/builds/matrix.yml b/.vsts.pipelines/builds/matrix.yml index 2c4a1fafdb..9650c34c29 100644 --- a/.vsts.pipelines/builds/matrix.yml +++ b/.vsts.pipelines/builds/matrix.yml @@ -31,8 +31,8 @@ jobs: - template: ../jobs/ci-linux.yml parameters: - job: fedora30 - imageName: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-30-39ec319-20190806171718 + job: fedora29 + imageName: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-98b4f89-20190506161422 matrix: Production: {} Online: { type: Online } From 7f298e67c1a82b73fcc1631d092a1bc89e0493e2 Mon Sep 17 00:00:00 2001 From: adaggarwal Date: Thu, 17 Oct 2019 21:07:58 +0000 Subject: [PATCH 13/19] wip --- build-source-tarball.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-source-tarball.sh b/build-source-tarball.sh index dae8895606..8842f3313e 100755 --- a/build-source-tarball.sh +++ b/build-source-tarball.sh @@ -147,6 +147,9 @@ git submodule foreach --quiet --recursive ' # Now re-uberclone into the tarball src directory. Since we reuse the .gitdirs, this shouldn't hit the network at all. ignored_repos="https://dev.azure.com/dnceng/internal/_git/dotnet-optimization;https://dev.azure.com/devdiv/DevDiv/_git/DotNet-Trusted;https://devdiv.visualstudio.com/DevDiv/_git/DotNet-Trusted;https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-optimization;https://dev.azure.com/dnceng/internal/_git/dotnet-core-setup;https://github.com/dotnet/source-build-reference-packages" + +#export the LC_LIB_PATH for libgit2 so file as fedora fails to find it in the repodir +export LD_LIBRARY_PATH=$CLI_PATH/tools/.store/microsoft.dotnet.darc/$(DarcVersion)/microsoft.dotnet.darc/$DarcVersion/tools/netcoreapp2.1/any/runtimes/rhel-x64/native/ "$CLI_PATH/dotnet" "$DARC_DLL" clone --repos-folder=$TARBALL_ROOT/src/ --git-dir-folder $SCRIPT_ROOT/.git/modules/src/ --include-toolset --ignore-repos "$ignored_repos" --azdev-pat bogus --github-pat bogus --depth 0 --debug # now we don't need .git/modules/src or Darc anymore From aed09a6eeff846876d217e0e05bc2946e7dc092e Mon Sep 17 00:00:00 2001 From: adaggarwal Date: Fri, 18 Oct 2019 01:45:18 +0000 Subject: [PATCH 14/19] wip --- build-source-tarball.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build-source-tarball.sh b/build-source-tarball.sh index 8842f3313e..272700cb8c 100755 --- a/build-source-tarball.sh +++ b/build-source-tarball.sh @@ -148,9 +148,10 @@ git submodule foreach --quiet --recursive ' # Now re-uberclone into the tarball src directory. Since we reuse the .gitdirs, this shouldn't hit the network at all. ignored_repos="https://dev.azure.com/dnceng/internal/_git/dotnet-optimization;https://dev.azure.com/devdiv/DevDiv/_git/DotNet-Trusted;https://devdiv.visualstudio.com/DevDiv/_git/DotNet-Trusted;https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-optimization;https://dev.azure.com/dnceng/internal/_git/dotnet-core-setup;https://github.com/dotnet/source-build-reference-packages" +set -x + #export the LC_LIB_PATH for libgit2 so file as fedora fails to find it in the repodir -export LD_LIBRARY_PATH=$CLI_PATH/tools/.store/microsoft.dotnet.darc/$(DarcVersion)/microsoft.dotnet.darc/$DarcVersion/tools/netcoreapp2.1/any/runtimes/rhel-x64/native/ -"$CLI_PATH/dotnet" "$DARC_DLL" clone --repos-folder=$TARBALL_ROOT/src/ --git-dir-folder $SCRIPT_ROOT/.git/modules/src/ --include-toolset --ignore-repos "$ignored_repos" --azdev-pat bogus --github-pat bogus --depth 0 --debug +LD_LIBRARY_PATH=$CLI_PATH/tools/.store/microsoft.dotnet.darc/$(DarcVersion)/microsoft.dotnet.darc/$DarcVersion/tools/netcoreapp2.1/any/runtimes/rhel-x64/native/ "$CLI_PATH/dotnet" "$DARC_DLL" clone --repos-folder=$TARBALL_ROOT/src/ --git-dir-folder $SCRIPT_ROOT/.git/modules/src/ --include-toolset --ignore-repos "$ignored_repos" --azdev-pat bogus --github-pat bogus --depth 0 --debug # now we don't need .git/modules/src or Darc anymore if [ $MINIMIZE_DISK_USAGE -eq 1 ]; then From 5904e1d00445069179d86e43621a079654e4b4f8 Mon Sep 17 00:00:00 2001 From: adaggarwal Date: Fri, 18 Oct 2019 02:06:03 +0000 Subject: [PATCH 15/19] add environment ld_path to build tarball --- build-source-tarball.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build-source-tarball.sh b/build-source-tarball.sh index 272700cb8c..84d433ed7e 100755 --- a/build-source-tarball.sh +++ b/build-source-tarball.sh @@ -148,10 +148,12 @@ git submodule foreach --quiet --recursive ' # Now re-uberclone into the tarball src directory. Since we reuse the .gitdirs, this shouldn't hit the network at all. ignored_repos="https://dev.azure.com/dnceng/internal/_git/dotnet-optimization;https://dev.azure.com/devdiv/DevDiv/_git/DotNet-Trusted;https://devdiv.visualstudio.com/DevDiv/_git/DotNet-Trusted;https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-optimization;https://dev.azure.com/dnceng/internal/_git/dotnet-core-setup;https://github.com/dotnet/source-build-reference-packages" -set -x - #export the LC_LIB_PATH for libgit2 so file as fedora fails to find it in the repodir -LD_LIBRARY_PATH=$CLI_PATH/tools/.store/microsoft.dotnet.darc/$(DarcVersion)/microsoft.dotnet.darc/$DarcVersion/tools/netcoreapp2.1/any/runtimes/rhel-x64/native/ "$CLI_PATH/dotnet" "$DARC_DLL" clone --repos-folder=$TARBALL_ROOT/src/ --git-dir-folder $SCRIPT_ROOT/.git/modules/src/ --include-toolset --ignore-repos "$ignored_repos" --azdev-pat bogus --github-pat bogus --depth 0 --debug +export LD_LIBRARY_PATH=$CLI_PATH/tools/.store/microsoft.dotnet.darc/$DarcVersion/microsoft.dotnet.darc/$DarcVersion/tools/netcoreapp2.1/any/runtimes/rhel-x64/native/ + +"$CLI_PATH/dotnet" "$DARC_DLL" clone --repos-folder=$TARBALL_ROOT/src/ --git-dir-folder $SCRIPT_ROOT/.git/modules/src/ --include-toolset --ignore-repos "$ignored_repos" --azdev-pat bogus --github-pat bogus --depth 0 --debug + +echo $LD_LIBRARY_PATH # now we don't need .git/modules/src or Darc anymore if [ $MINIMIZE_DISK_USAGE -eq 1 ]; then From 3fd923043f1476054616523197ee9ead0da8bcaf Mon Sep 17 00:00:00 2001 From: adaggarwal Date: Fri, 18 Oct 2019 19:14:22 +0000 Subject: [PATCH 16/19] code review resolve --- build-source-tarball.sh | 2 -- tools-local/init-build.proj | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/build-source-tarball.sh b/build-source-tarball.sh index 84d433ed7e..270814235d 100755 --- a/build-source-tarball.sh +++ b/build-source-tarball.sh @@ -153,8 +153,6 @@ export LD_LIBRARY_PATH=$CLI_PATH/tools/.store/microsoft.dotnet.darc/$DarcVersion "$CLI_PATH/dotnet" "$DARC_DLL" clone --repos-folder=$TARBALL_ROOT/src/ --git-dir-folder $SCRIPT_ROOT/.git/modules/src/ --include-toolset --ignore-repos "$ignored_repos" --azdev-pat bogus --github-pat bogus --depth 0 --debug -echo $LD_LIBRARY_PATH - # now we don't need .git/modules/src or Darc anymore if [ $MINIMIZE_DISK_USAGE -eq 1 ]; then rm -rf "$SCRIPT_ROOT/.git/modules/src" diff --git a/tools-local/init-build.proj b/tools-local/init-build.proj index 7b7e4d679d..d60c906afc 100644 --- a/tools-local/init-build.proj +++ b/tools-local/init-build.proj @@ -23,7 +23,7 @@ Inputs="$(TargetInfoProps)" Outputs="$(BuildCompetedSuccessSemaphore)" > - + @@ -153,13 +153,13 @@ - + - + clone @@ -187,7 +187,7 @@ - + Date: Fri, 18 Oct 2019 19:33:45 +0000 Subject: [PATCH 17/19] code review resolve --- DarcVersion.txt | 1 + dir.props | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 DarcVersion.txt diff --git a/DarcVersion.txt b/DarcVersion.txt new file mode 100644 index 0000000000..f7b6a8196d --- /dev/null +++ b/DarcVersion.txt @@ -0,0 +1 @@ +1.1.0-beta.19515.3 \ No newline at end of file diff --git a/dir.props b/dir.props index a0d5deddb8..9b75e7f40a 100644 --- a/dir.props +++ b/dir.props @@ -58,7 +58,7 @@ $(ToolsDir)source-built/ $(ProjectDir)tools-local/ $(ToolsLocalDir)tasks/ - 1.1.0-beta.19515.3 + $([System.IO.File]::ReadAllText('$(ProjectDir)DarcVersion.txt').Trim()) $(DotNetCliToolDir)tools/.store/microsoft.dotnet.darc/$(DarcVersion)/microsoft.dotnet.darc/$(DarcVersion)/tools/netcoreapp2.1/any/Microsoft.DotNet.Darc.dll $(TaskDirectory)Microsoft.DotNet.SourceBuild.Tasks/bin/Debug/netstandard2.0/ $(TasksBinDir)Microsoft.DotNet.SourceBuild.Tasks.dll From 0c2cdc6c18efb9ab4131253fcc2aa8a634cd3ce5 Mon Sep 17 00:00:00 2001 From: adaggarwal Date: Fri, 18 Oct 2019 19:51:51 +0000 Subject: [PATCH 18/19] code review resolve --- build-source-tarball.sh | 2 +- dir.props | 1 + eng/common/darc-init.sh | 35 +++++++++++++++++++++++++++-------- tools-local/init-build.proj | 2 +- 4 files changed, 30 insertions(+), 10 deletions(-) diff --git a/build-source-tarball.sh b/build-source-tarball.sh index 270814235d..55baef7684 100755 --- a/build-source-tarball.sh +++ b/build-source-tarball.sh @@ -79,7 +79,7 @@ if [[ $sdkLine =~ $sdkPattern ]]; then fi echo "Found bootstrap SDK $SDK_VERSION" CLI_PATH="$SCRIPT_ROOT/.dotnet" -DarcVersion=1.1.0-beta.19515.3 +DarcVersion=$(cat $SCRIPT_ROOT/DarcVersion.txt) DARC_DLL="$CLI_PATH/tools/.store/microsoft.dotnet.darc/$DarcVersion/microsoft.dotnet.darc/$DarcVersion/tools/netcoreapp2.1/any/Microsoft.DotNet.Darc.dll" if [ $SKIP_BUILD -ne 1 ]; then diff --git a/dir.props b/dir.props index 9b75e7f40a..b362eb40b4 100644 --- a/dir.props +++ b/dir.props @@ -58,6 +58,7 @@ $(ToolsDir)source-built/ $(ProjectDir)tools-local/ $(ToolsLocalDir)tasks/ + $(DotNetCliToolDir)tools/ $([System.IO.File]::ReadAllText('$(ProjectDir)DarcVersion.txt').Trim()) $(DotNetCliToolDir)tools/.store/microsoft.dotnet.darc/$(DarcVersion)/microsoft.dotnet.darc/$(DarcVersion)/tools/netcoreapp2.1/any/Microsoft.DotNet.Darc.dll $(TaskDirectory)Microsoft.DotNet.SourceBuild.Tasks/bin/Debug/netstandard2.0/ diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh index 3e67ae5d2f..82b2b57677 100755 --- a/eng/common/darc-init.sh +++ b/eng/common/darc-init.sh @@ -3,6 +3,7 @@ source="${BASH_SOURCE[0]}" darcVersion='' versionEndpoint="https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16" +verbosity=m while [[ $# > 0 ]]; do opt="$(echo "$1" | awk '{print tolower($0)}')" @@ -15,6 +16,14 @@ while [[ $# > 0 ]]; do versionEndpoint=$2 shift ;; + --verbosity) + verbosity=$2 + shift + ;; + --toolpath) + toolpath=$2 + shift + ;; *) echo "Invalid argument: $1" usage @@ -34,7 +43,6 @@ while [[ -h "$source" ]]; do [[ $source != /* ]] && source="$scriptroot/$source" done scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" -verbosity=m . "$scriptroot/tools.sh" @@ -48,16 +56,27 @@ function InstallDarcCli { InitializeDotNetCli local dotnet_root=$_InitializeDotNetCli - local uninstall_command=`$dotnet_root/dotnet tool uninstall $darc_cli_package_name -g` - local tool_list=$($dotnet_root/dotnet tool list --tool-path $dotnet_root/tools) - if [[ $tool_list = *$darc_cli_package_name* ]]; then - echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name --tool-path $dotnet_root/tools) + if [ -z "$toolpath" ]; then + local tool_list=$($dotnet_root/dotnet tool list -g) + if [[ $tool_list = *$darc_cli_package_name* ]]; then + echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g) + fi + else + local tool_list=$($dotnet_root/dotnet tool list --tool-path "$toolpath") + if [[ $tool_list = *$darc_cli_package_name* ]]; then + echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name --tool-path "$toolpath") + fi fi - local arcadeServicesSource="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" - echo "Installing Darc CLI version $darcVersion in $dotnet_root/tools..." + local arcadeServicesSource="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" + + echo "Installing Darc CLI version $darcVersion..." echo "You may need to restart your command shell if this is the first dotnet tool you have installed." - echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path $dotnet_root/tools --framework netcoreapp3.0) + if [ -z "$toolpath" ]; then + echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g) + else + echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath") + fi } InstallDarcCli diff --git a/tools-local/init-build.proj b/tools-local/init-build.proj index d60c906afc..f430f040b8 100644 --- a/tools-local/init-build.proj +++ b/tools-local/init-build.proj @@ -155,7 +155,7 @@ - + From 1ba1c55b6d73abe04fa2945d252e881ce54fa647 Mon Sep 17 00:00:00 2001 From: adaggarwal Date: Sun, 20 Oct 2019 00:50:55 +0000 Subject: [PATCH 19/19] add darcVersion to tarball --- build-source-tarball.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build-source-tarball.sh b/build-source-tarball.sh index 55baef7684..f296f1c20f 100755 --- a/build-source-tarball.sh +++ b/build-source-tarball.sh @@ -187,6 +187,7 @@ cp $SCRIPT_ROOT/*.proj $TARBALL_ROOT/ cp $SCRIPT_ROOT/*.props $TARBALL_ROOT/ cp $SCRIPT_ROOT/*.targets $TARBALL_ROOT/ cp $SCRIPT_ROOT/global.json $TARBALL_ROOT/ +cp $SCRIPT_ROOT/DarcVersion.txt $TARBALL_ROOT/ cp $SCRIPT_ROOT/ProdConFeed.txt $TARBALL_ROOT/ cp $SCRIPT_ROOT/smoke-test* $TARBALL_ROOT/ cp -r $CLI_PATH $TARBALL_ROOT/