Fix dotnet-install for the new Azure Publish layout.
This commit is contained in:
parent
63846c5751
commit
ba1715b8a6
4 changed files with 16 additions and 31 deletions
|
@ -73,8 +73,7 @@ if (!(Test-Path $env:DOTNET_INSTALL_DIR))
|
|||
# Install a stage 0
|
||||
Write-Host "Installing .NET Core CLI Stage 0 from branchinfo channel"
|
||||
|
||||
#TODO change 'preview' channel back to $env:CHANNEL when we have a first build in the current channel
|
||||
& "$RepoRoot\scripts\obtain\dotnet-install.ps1" -Channel preview -Architecture $Architecture -Verbose
|
||||
& "$RepoRoot\scripts\obtain\dotnet-install.ps1" -Channel $env:CHANNEL -Architecture $Architecture -Verbose
|
||||
if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" }
|
||||
|
||||
# Put the stage0 on the path
|
||||
|
|
|
@ -87,8 +87,7 @@ done < "$REPOROOT/branchinfo.txt"
|
|||
[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$(uname)
|
||||
[ -d "$DOTNET_INSTALL_DIR" ] || mkdir -p $DOTNET_INSTALL_DIR
|
||||
|
||||
#TODO change 'preview' channel back to $env:CHANNEL when we have a first build in the current channel
|
||||
$REPOROOT/scripts/obtain/dotnet-install.sh --channel preview --verbose
|
||||
$REPOROOT/scripts/obtain/dotnet-install.sh --channel $CHANNEL --verbose
|
||||
|
||||
# Put stage 0 on the PATH (for this shell only)
|
||||
PATH="$DOTNET_INSTALL_DIR:$PATH"
|
||||
|
|
23
scripts/obtain/dotnet-install.ps1
vendored
23
scripts/obtain/dotnet-install.ps1
vendored
|
@ -50,7 +50,7 @@
|
|||
#>
|
||||
[cmdletbinding()]
|
||||
param(
|
||||
[string]$Channel="preview",
|
||||
[string]$Channel="rel-1.0.0",
|
||||
[string]$Version="Latest",
|
||||
[string]$InstallDir="<auto>",
|
||||
[string]$Architecture="<auto>",
|
||||
|
@ -123,7 +123,7 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$AzureChannel, [str
|
|||
$VersionFileUrl = "$AzureFeed/$AzureChannel/dnvm/latest.sharedfx.win.$CLIArchitecture.version"
|
||||
}
|
||||
else {
|
||||
$VersionFileUrl = "$AzureFeed/$AzureChannel/dnvm/latest.win.$CLIArchitecture.version"
|
||||
$VersionFileUrl = "$AzureFeed/Sdk/$AzureChannel/latest.version"
|
||||
}
|
||||
|
||||
$Response = Invoke-WebRequest -UseBasicParsing $VersionFileUrl
|
||||
|
@ -147,10 +147,8 @@ function Get-Azure-Channel-From-Channel([string]$Channel) {
|
|||
# For compatibility with build scripts accept also directly Azure channels names
|
||||
switch ($Channel.ToLower()) {
|
||||
{ ($_ -eq "future") -or ($_ -eq "dev") } { return "dev" }
|
||||
{ ($_ -eq "beta") } { return "beta" }
|
||||
{ ($_ -eq "preview") } { return "preview" }
|
||||
{ $_ -eq "production" } { throw "Production channel does not exist yet" }
|
||||
default { throw "``$Channel`` is an invalid channel name. Use one of the following: ``future``, ``preview``, ``production``" }
|
||||
default { return $_ }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -171,20 +169,17 @@ function Get-Download-Links([string]$AzureFeed, [string]$AzureChannel, [string]$
|
|||
Say-Invocation $MyInvocation
|
||||
|
||||
$ret = @()
|
||||
$files = @()
|
||||
|
||||
if ($SharedRuntime) {
|
||||
$files += "dotnet";
|
||||
$PayloadURL = "$AzureFeed/$AzureChannel/Binaries/$SpecificVersion/dotnet-win-$CLIArchitecture.$SpecificVersion.zip"
|
||||
}
|
||||
else {
|
||||
$files += "dotnet-dev";
|
||||
}
|
||||
|
||||
foreach ($file in $files) {
|
||||
$PayloadURL = "$AzureFeed/$AzureChannel/Binaries/$SpecificVersion/$file-win-$CLIArchitecture.$SpecificVersion.zip"
|
||||
Say-Verbose "Constructed payload URL: $PayloadURL"
|
||||
$ret += $PayloadURL
|
||||
$PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-dev-win-$CLIArchitecture.$SpecificVersion.zip"
|
||||
}
|
||||
|
||||
Say-Verbose "Constructed payload URL: $PayloadURL"
|
||||
$ret += $PayloadURL
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
|
|
18
scripts/obtain/dotnet-install.sh
vendored
18
scripts/obtain/dotnet-install.sh
vendored
|
@ -288,7 +288,7 @@ get_latest_version_info() {
|
|||
if [ "$shared_runtime" = true ]; then
|
||||
version_file_url="$azure_feed/$azure_channel/dnvm/latest.sharedfx.$osname.$normalized_architecture.version"
|
||||
else
|
||||
version_file_url="$azure_feed/$azure_channel/dnvm/latest.$osname.$normalized_architecture.version"
|
||||
version_file_url="$azure_feed/Sdk/$azure_channel/latest.version"
|
||||
fi
|
||||
say_verbose "get_latest_version_info: latest url: $version_file_url"
|
||||
|
||||
|
@ -307,21 +307,13 @@ get_azure_channel_from_channel() {
|
|||
echo "dev"
|
||||
return 0
|
||||
;;
|
||||
beta)
|
||||
echo "beta"
|
||||
return 0
|
||||
;;
|
||||
preview)
|
||||
echo "preview"
|
||||
return 0
|
||||
;;
|
||||
production)
|
||||
say_err "Production channel does not exist yet"
|
||||
return 1
|
||||
esac
|
||||
|
||||
say_err "``$1`` is an invalid channel name. Use one of the following: ``future``, ``preview``, ``production``"
|
||||
return 1
|
||||
echo $channel
|
||||
return 0
|
||||
}
|
||||
|
||||
# args:
|
||||
|
@ -374,7 +366,7 @@ construct_download_link() {
|
|||
if [ "$shared_runtime" = true ]; then
|
||||
download_link="$azure_feed/$azure_channel/Binaries/$specific_version/dotnet-$osname-$normalized_architecture.$specific_version.tar.gz"
|
||||
else
|
||||
download_link="$azure_feed/$azure_channel/Binaries/$specific_version/dotnet-dev-$osname-$normalized_architecture.$specific_version.tar.gz"
|
||||
download_link="$azure_feed/Sdk/$specific_version/dotnet-dev-$osname-$normalized_architecture.$specific_version.tar.gz"
|
||||
fi
|
||||
|
||||
echo "$download_link"
|
||||
|
@ -557,7 +549,7 @@ local_version_file_relative_path="/.version"
|
|||
bin_folder_relative_path=""
|
||||
temporary_file_template="${TMPDIR:-/tmp}/dotnet.XXXXXXXXX"
|
||||
|
||||
channel="preview"
|
||||
channel="rel-1.0.0"
|
||||
version="Latest"
|
||||
install_dir="<auto>"
|
||||
architecture="<auto>"
|
||||
|
|
Loading…
Add table
Reference in a new issue