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/build-source-tarball.sh b/build-source-tarball.sh index b34dc56b91..f296f1c20f 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=$(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 @@ -146,6 +147,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" + +#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 @@ -182,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/ @@ -192,6 +198,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 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..b362eb40b4 100644 --- a/dir.props +++ b/dir.props @@ -58,7 +58,9 @@ $(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/ + $([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 $(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..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,17 +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 -g) - if [[ $tool_list = *$darc_cli_package_name* ]]; then - echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g) + 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" + 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 -g) + 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/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 - - - - - - - diff --git a/tools-local/init-build.proj b/tools-local/init-build.proj index fb8faec181..f430f040b8 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 @@ -183,11 +183,11 @@ $(DotNetCliToolDir)dotnet $(DarcDll) $(DarcCloneArguments) - + - +