summaryrefslogtreecommitdiff
path: root/eng/common/darc-init.sh
diff options
context:
space:
mode:
Diffstat (limited to 'eng/common/darc-init.sh')
-rwxr-xr-xeng/common/darc-init.sh15
1 files changed, 12 insertions, 3 deletions
diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh
index bd7eb46398..abdd0bc05a 100755
--- a/eng/common/darc-init.sh
+++ b/eng/common/darc-init.sh
@@ -1,7 +1,8 @@
#!/usr/bin/env bash
source="${BASH_SOURCE[0]}"
-darcVersion="1.1.0-beta.19205.4"
+darcVersion=''
+versionEndpoint="https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16"
while [[ $# > 0 ]]; do
opt="$(echo "$1" | awk '{print tolower($0)}')"
@@ -10,6 +11,10 @@ while [[ $# > 0 ]]; do
darcVersion=$2
shift
;;
+ --versionendpoint)
+ versionEndpoint=$2
+ shift
+ ;;
*)
echo "Invalid argument: $1"
usage
@@ -33,6 +38,10 @@ verbosity=m
. "$scriptroot/tools.sh"
+if [ -z "$darcVersion" ]; then
+ darcVersion=$(curl -X GET "$versionEndpoint" -H "accept: text/plain")
+fi
+
function InstallDarcCli {
local darc_cli_package_name="microsoft.dotnet.darc"
@@ -45,9 +54,9 @@ function InstallDarcCli {
echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g)
fi
- local arcadeServicesSource="https://dotnetfeed.blob.core.windows.net/dotnet-arcade/index.json"
+ local arcadeServicesSource="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json"
- echo "Installing Darc CLI version $toolset_version..."
+ 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)
}