From 8525dbdae31abaa0f377b2d326561091f9ceacee Mon Sep 17 00:00:00 2001 From: glennc Date: Wed, 28 Oct 2015 15:04:11 -0700 Subject: [PATCH] initial changes for new storage account --- scripts/dnvm2.ps1 | 7 ++++--- scripts/dnvm2.sh | 9 ++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/dnvm2.ps1 b/scripts/dnvm2.ps1 index c33adb835..293fc0c0e 100644 --- a/scripts/dnvm2.ps1 +++ b/scripts/dnvm2.ps1 @@ -540,7 +540,7 @@ function Find-Package { _WriteOut "Determining latest version" $RuntimeId = $runtimeInfo.RuntimeId _WriteDebug "Latest RuntimeId: $RuntimeId" - $url = Join-UrlFragments $Feed,$channel,"dnvm","index" + $url = Join-UrlFragments $Feed,$channel,"dnvm","latest.win" _WriteDebug "Index URL: $url" $wc = New-Object System.Net.WebClient @@ -554,13 +554,14 @@ function Find-Package { } if($runtimeInfo.Version -eq "latest") { - $version = $index | ?{$_ -match "Latest: (?.+)?"} | %{$matches["version"]} + #/Binaries/0.0.1-alpha-00003/dotnet-osx-x64.0.0.1-alpha-00003.tar.gz + $version = $index | ?{$_ -match "^.+/dotnet-$($runtimeInfo.OS)-$($runtimeInfo.Architecture).(?.+)?.zip"} | %{$matches["version"]} } else { $version = $runtimeInfo.Version } if($version) { - $urlPart = $index | ?{$_ -match "Filename: (?.+?$RuntimeId.$version.zip)"} | %{$matches["url"]} + $urlPart = $index _WriteDebug "Found Package Path: $urlPart" $downloadUrl = Join-UrlFragments $Feed,$channel,$urlPart _WriteDebug "Found $version at $downloadUrl" diff --git a/scripts/dnvm2.sh b/scripts/dnvm2.sh index 498340468..46f1a088c 100755 --- a/scripts/dnvm2.sh +++ b/scripts/dnvm2.sh @@ -11,7 +11,7 @@ _DNVM_RUNTIME_FOLDER_NAME=".dotnet" _DNVM_COMMAND_NAME="dnvm" _DNVM_PACKAGE_MANAGER_NAME="dnu" _DNVM_VERSION_MANAGER_NAME=".NET Version Manager" -_DNVM_DEFAULT_FEED="https://distaspnet.blob.core.windows.net/dotnet" +_DNVM_DEFAULT_FEED="https://dotnetcli.blob.core.windows.net/dotnet" _DNVM_DEFAULT_CHANNEL="dev" _DNVM_DEFAULT_UNSTABLE_CHANNEL="dev" _DNVM_UPDATE_LOCATION="https://raw.githubusercontent.com/aspnet/Home/dev/dnvm.sh" @@ -89,14 +89,13 @@ __dnvm_find_latest() { #dnx-coreclr-linux-x64 local packageId="$_DNVM_RUNTIME_PACKAGE_NAME-$os-$arch" - local url="$DNX_ACTIVE_FEED/$DNX_ACTIVE_CHANNEL/dnvm/index" + local url="$DNX_ACTIVE_FEED/$DNX_ACTIVE_CHANNEL/dnvm/latest.$os" local index="$(curl $url 2>/dev/null)" - local version="$(export IFS=; echo $index | sed -n 's/Latest: \(.*\)/\1/p')" + local version="$(export IFS=; echo $index | sed -n 's/^.*dotnet-$os-$arch\.\(.*\)\.tar\.gz$/\1/p')" local fullPackageId="$packageId.$version" - local filename="$(export IFS=; echo $index | sed -n "s/Filename: \(.*$fullPackageId\)/\1/p")" - local downloadUrl="$DNX_ACTIVE_FEED/$DNX_ACTIVE_CHANNEL/$filename" + local downloadUrl="$DNX_ACTIVE_FEED/$DNX_ACTIVE_CHANNEL/$index" echo $version $downloadUrl }