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