initial changes for new storage account

This commit is contained in:
glennc 2015-10-28 15:04:11 -07:00
parent 1654235d74
commit 8525dbdae3
2 changed files with 8 additions and 8 deletions

View file

@ -540,7 +540,7 @@ function Find-Package {
_WriteOut "Determining latest version" _WriteOut "Determining latest version"
$RuntimeId = $runtimeInfo.RuntimeId $RuntimeId = $runtimeInfo.RuntimeId
_WriteDebug "Latest RuntimeId: $RuntimeId" _WriteDebug "Latest RuntimeId: $RuntimeId"
$url = Join-UrlFragments $Feed,$channel,"dnvm","index" $url = Join-UrlFragments $Feed,$channel,"dnvm","latest.win"
_WriteDebug "Index URL: $url" _WriteDebug "Index URL: $url"
$wc = New-Object System.Net.WebClient $wc = New-Object System.Net.WebClient
@ -554,13 +554,14 @@ function Find-Package {
} }
if($runtimeInfo.Version -eq "latest") { if($runtimeInfo.Version -eq "latest") {
$version = $index | ?{$_ -match "Latest: (?<version>.+)?"} | %{$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).(?<version>.+)?.zip"} | %{$matches["version"]}
} else { } else {
$version = $runtimeInfo.Version $version = $runtimeInfo.Version
} }
if($version) { if($version) {
$urlPart = $index | ?{$_ -match "Filename: (?<url>.+?$RuntimeId.$version.zip)"} | %{$matches["url"]} $urlPart = $index
_WriteDebug "Found Package Path: $urlPart" _WriteDebug "Found Package Path: $urlPart"
$downloadUrl = Join-UrlFragments $Feed,$channel,$urlPart $downloadUrl = Join-UrlFragments $Feed,$channel,$urlPart
_WriteDebug "Found $version at $downloadUrl" _WriteDebug "Found $version at $downloadUrl"

View file

@ -11,7 +11,7 @@ _DNVM_RUNTIME_FOLDER_NAME=".dotnet"
_DNVM_COMMAND_NAME="dnvm" _DNVM_COMMAND_NAME="dnvm"
_DNVM_PACKAGE_MANAGER_NAME="dnu" _DNVM_PACKAGE_MANAGER_NAME="dnu"
_DNVM_VERSION_MANAGER_NAME=".NET Version Manager" _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_CHANNEL="dev"
_DNVM_DEFAULT_UNSTABLE_CHANNEL="dev" _DNVM_DEFAULT_UNSTABLE_CHANNEL="dev"
_DNVM_UPDATE_LOCATION="https://raw.githubusercontent.com/aspnet/Home/dev/dnvm.sh" _DNVM_UPDATE_LOCATION="https://raw.githubusercontent.com/aspnet/Home/dev/dnvm.sh"
@ -89,14 +89,13 @@ __dnvm_find_latest() {
#dnx-coreclr-linux-x64 #dnx-coreclr-linux-x64
local packageId="$_DNVM_RUNTIME_PACKAGE_NAME-$os-$arch" 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 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 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 echo $version $downloadUrl
} }