Update to aspnetcore 2.1.0-preview1-28275 and react to feed layout changes (#8611)

This commit is contained in:
Nate McMaster 2018-02-14 11:50:14 -08:00 committed by John Beisner
parent 73963e8018
commit 62ce305f06
4 changed files with 48 additions and 25 deletions

View file

@ -49,6 +49,7 @@
<PropertyGroup> <PropertyGroup>
<CoreSetupRootUrl>$(CoreSetupBlobRootUrl)Runtime/</CoreSetupRootUrl> <CoreSetupRootUrl>$(CoreSetupBlobRootUrl)Runtime/</CoreSetupRootUrl>
<AspNetCoreSharedFxRootUrl>$(CoreSetupBlobRootUrl)aspnetcore/Runtime/</AspNetCoreSharedFxRootUrl>
<CoreSetupDownloadDirectory>$(IntermediateDirectory)/coreSetupDownload/$(MicrosoftNETCoreAppPackageVersion)</CoreSetupDownloadDirectory> <CoreSetupDownloadDirectory>$(IntermediateDirectory)/coreSetupDownload/$(MicrosoftNETCoreAppPackageVersion)</CoreSetupDownloadDirectory>
<CombinedSharedHostAndFrameworkArchive>$(CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive$(ArchiveExtension)</CombinedSharedHostAndFrameworkArchive> <CombinedSharedHostAndFrameworkArchive>$(CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive$(ArchiveExtension)</CombinedSharedHostAndFrameworkArchive>
</PropertyGroup> </PropertyGroup>
@ -56,7 +57,7 @@
<ItemGroup> <ItemGroup>
<_DownloadAndExtractItem Include="AspNetCoreSharedFxArchiveFile" <_DownloadAndExtractItem Include="AspNetCoreSharedFxArchiveFile"
Condition="!Exists('$(AspNetCoreSharedFxArchiveFile)')"> Condition="!Exists('$(AspNetCoreSharedFxArchiveFile)')">
<Url>$(CoreSetupRootUrl)$(AspNetCoreVersion)/$(AspNetCoreSharedFxArchiveFileName)$(CoreSetupBlobAccessTokenParam)</Url> <Url>$(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)/$(AspNetCoreSharedFxArchiveFileName)$(CoreSetupBlobAccessTokenParam)</Url>
<DownloadFileName>$(AspNetCoreSharedFxArchiveFile)</DownloadFileName> <DownloadFileName>$(AspNetCoreSharedFxArchiveFile)</DownloadFileName>
<ExtractDestination>$(AspNetCoreSharedFxPublishDirectory)</ExtractDestination> <ExtractDestination>$(AspNetCoreSharedFxPublishDirectory)</ExtractDestination>
</_DownloadAndExtractItem> </_DownloadAndExtractItem>
@ -98,14 +99,14 @@
<_DownloadAndExtractItem Include="DownloadedAspNetCoreSharedFxInstallerFile" <_DownloadAndExtractItem Include="DownloadedAspNetCoreSharedFxInstallerFile"
Condition="'$(SkipBuildingInstallers)' != 'true' AND '$(DownloadedAspNetCoreSharedFxInstallerFile)' != '' AND !Exists($(DownloadedAspNetCoreSharedFxInstallerFile)) And '$(InstallerExtension)' != ''"> Condition="'$(SkipBuildingInstallers)' != 'true' AND '$(DownloadedAspNetCoreSharedFxInstallerFile)' != '' AND !Exists($(DownloadedAspNetCoreSharedFxInstallerFile)) And '$(InstallerExtension)' != ''">
<Url>$(CoreSetupRootUrl)$(AspNetCoreVersion)/$(DownloadedAspNetCoreSharedFxInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url> <Url>$(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)/$(DownloadedAspNetCoreSharedFxInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url>
<DownloadFileName>$(DownloadedAspNetCoreSharedFxInstallerFile)</DownloadFileName> <DownloadFileName>$(DownloadedAspNetCoreSharedFxInstallerFile)</DownloadFileName>
<ExtractDestination></ExtractDestination> <ExtractDestination></ExtractDestination>
</_DownloadAndExtractItem> </_DownloadAndExtractItem>
<_DownloadAndExtractItem Include="AspNetCoreSharedFxBaseRuntimeVersionFile" <_DownloadAndExtractItem Include="AspNetCoreSharedFxBaseRuntimeVersionFile"
Condition="!Exists('$(AspNetCoreSharedFxBaseRuntimeVersionFile)')"> Condition="!Exists('$(AspNetCoreSharedFxBaseRuntimeVersionFile)')">
<Url>$(CoreSetupRootUrl)$(AspNetCoreVersion)/$(AspNetCoreSharedFxBaseRuntimeVersionFileName)$(CoreSetupBlobAccessTokenParam)</Url> <Url>$(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)/$(AspNetCoreSharedFxBaseRuntimeVersionFileName)$(CoreSetupBlobAccessTokenParam)</Url>
<DownloadFileName>$(AspNetCoreSharedFxBaseRuntimeVersionFile)</DownloadFileName> <DownloadFileName>$(AspNetCoreSharedFxBaseRuntimeVersionFile)</DownloadFileName>
<ExtractDestination></ExtractDestination> <ExtractDestination></ExtractDestination>
</_DownloadAndExtractItem> </_DownloadAndExtractItem>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<MicrosoftAspNetCoreAllPackageVersion>2.1.0-preview1-28263</MicrosoftAspNetCoreAllPackageVersion> <MicrosoftAspNetCoreAppPackageVersion>2.1.0-preview1-28275</MicrosoftAspNetCoreAppPackageVersion>
<MicrosoftNETCoreAppPackageVersion>2.1.0-preview1-26116-04</MicrosoftNETCoreAppPackageVersion> <MicrosoftNETCoreAppPackageVersion>2.1.0-preview1-26116-04</MicrosoftNETCoreAppPackageVersion>
<MicrosoftNETCoreDotNetHostResolverPackageVersion>$(MicrosoftNETCoreAppPackageVersion)</MicrosoftNETCoreDotNetHostResolverPackageVersion> <MicrosoftNETCoreDotNetHostResolverPackageVersion>$(MicrosoftNETCoreAppPackageVersion)</MicrosoftNETCoreDotNetHostResolverPackageVersion>
<MicrosoftBuildPackageVersion>15.6.81</MicrosoftBuildPackageVersion> <MicrosoftBuildPackageVersion>15.6.81</MicrosoftBuildPackageVersion>
@ -59,7 +59,7 @@
<SharedHostVersion>$(MicrosoftNETCoreAppPackageVersion)</SharedHostVersion> <SharedHostVersion>$(MicrosoftNETCoreAppPackageVersion)</SharedHostVersion>
<HostFxrVersion>$(MicrosoftNETCoreAppPackageVersion)</HostFxrVersion> <HostFxrVersion>$(MicrosoftNETCoreAppPackageVersion)</HostFxrVersion>
<AspNetCoreVersion>$(MicrosoftAspNetCoreAllPackageVersion)</AspNetCoreVersion> <AspNetCoreVersion>$(MicrosoftAspNetCoreAppPackageVersion)</AspNetCoreVersion>
</PropertyGroup> </PropertyGroup>
<!-- infrastructure and test only dependencies --> <!-- infrastructure and test only dependencies -->

View file

@ -43,8 +43,8 @@
.PARAMETER Runtime .PARAMETER Runtime
Installs just a shared runtime, not the entire SDK. Installs just a shared runtime, not the entire SDK.
Possible values: Possible values:
- dotnet - dotnet - the Microsoft.NETCore.App shared runtime
- aspnetcore - aspnetcore - the Microsoft.AspNetCore.App shared runtime
.PARAMETER DryRun .PARAMETER DryRun
If set it will not perform installation but instead display what command line to use to consistently install If set it will not perform installation but instead display what command line to use to consistently install
currently requested version of dotnet cli. In example if you specify version 'latest' it will display a link currently requested version of dotnet cli. In example if you specify version 'latest' it will display a link
@ -249,10 +249,10 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Co
if ($Runtime -eq "dotnet") { if ($Runtime -eq "dotnet") {
$VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.version" $VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.version"
} }
elseif ($Runtime) { elseif ($Runtime -eq "aspnetcore") {
$VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.$Runtime.version" $VersionFileUrl = "$UncachedFeed/aspnetcore/Runtime/$Channel/latest.version"
} }
else { elseif (-not $Runtime) {
if ($Coherent) { if ($Coherent) {
$VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.coherent.version" $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.coherent.version"
} }
@ -260,6 +260,9 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Co
$VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version" $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version"
} }
} }
else {
throw "Invalid value for `$Runtime"
}
$Response = GetHTTPResponse -Uri $VersionFileUrl $Response = GetHTTPResponse -Uri $VersionFileUrl
$StringContent = $Response.Content.ReadAsStringAsync().Result $StringContent = $Response.Content.ReadAsStringAsync().Result
@ -296,11 +299,17 @@ function Get-Specific-Version-From-Version([string]$AzureFeed, [string]$Channel,
function Get-Download-Link([string]$AzureFeed, [string]$SpecificVersion, [string]$CLIArchitecture) { function Get-Download-Link([string]$AzureFeed, [string]$SpecificVersion, [string]$CLIArchitecture) {
Say-Invocation $MyInvocation Say-Invocation $MyInvocation
if ($Runtime) { if ($Runtime -eq "dotnet") {
$PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/$Runtime-runtime-$SpecificVersion-win-$CLIArchitecture.zip" $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-runtime-$SpecificVersion-win-$CLIArchitecture.zip"
}
elseif ($Runtime -eq "aspnetcore") {
$PayloadURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/aspnetcore-runtime-$SpecificVersion-win-$CLIArchitecture.zip"
}
elseif (-not $Runtime) {
$PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificVersion-win-$CLIArchitecture.zip"
} }
else { else {
$PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificVersion-win-$CLIArchitecture.zip" throw "Invalid value for `$Runtime"
} }
Say-Verbose "Constructed primary payload URL: $PayloadURL" Say-Verbose "Constructed primary payload URL: $PayloadURL"
@ -503,12 +512,15 @@ if ($Runtime -eq "dotnet") {
} }
elseif ($Runtime -eq "aspnetcore") { elseif ($Runtime -eq "aspnetcore") {
$assetName = "ASP.NET Core Runtime" $assetName = "ASP.NET Core Runtime"
$dotnetPackageRelativePath = "shared\Microsoft.AspNetCore.All" $dotnetPackageRelativePath = "shared\Microsoft.AspNetCore.App"
} }
else { elseif (-not $Runtime) {
$assetName = ".NET Core SDK" $assetName = ".NET Core SDK"
$dotnetPackageRelativePath = "sdk" $dotnetPackageRelativePath = "sdk"
} }
else {
throw "Invalid value for `$Runtime"
}
$isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $SpecificVersion $isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $SpecificVersion
if ($isAssetInstalled) { if ($isAssetInstalled) {

View file

@ -390,14 +390,17 @@ get_latest_version_info() {
local version_file_url=null local version_file_url=null
if [[ "$runtime" == "dotnet" ]]; then if [[ "$runtime" == "dotnet" ]]; then
version_file_url="$uncached_feed/Runtime/$channel/latest.version" version_file_url="$uncached_feed/Runtime/$channel/latest.version"
elif [ ! -z "$runtime" ]; then elif [[ "$runtime" == "aspnetcore" ]]; then
version_file_url="$uncached_feed/Runtime/$channel/latest.$runtime.version" version_file_url="$uncached_feed/aspnetcore/Runtime/$channel/latest.version"
else elif [ -z "$runtime" ]; then
if [ "$coherent" = true ]; then if [ "$coherent" = true ]; then
version_file_url="$uncached_feed/Sdk/$channel/latest.coherent.version" version_file_url="$uncached_feed/Sdk/$channel/latest.coherent.version"
else else
version_file_url="$uncached_feed/Sdk/$channel/latest.version" version_file_url="$uncached_feed/Sdk/$channel/latest.version"
fi fi
else
say_err "Invalid value for \$runtime"
return 1
fi fi
say_verbose "get_latest_version_info: latest url: $version_file_url" say_verbose "get_latest_version_info: latest url: $version_file_url"
@ -457,10 +460,14 @@ construct_download_link() {
osname="$(get_current_os_name)" || return 1 osname="$(get_current_os_name)" || return 1
local download_link=null local download_link=null
if [ ! -z "$runtime" ]; then if [[ "$runtime" == "dotnet" ]]; then
download_link="$azure_feed/Runtime/$specific_version/$runtime-runtime-$specific_version-$osname-$normalized_architecture.tar.gz" download_link="$azure_feed/Runtime/$specific_version/dotnet-runtime-$specific_version-$osname-$normalized_architecture.tar.gz"
else elif [[ "$runtime" == "aspnetcore" ]]; then
download_link="$azure_feed/aspnetcore/Runtime/$specific_version/aspnetcore-runtime-$specific_version-$osname-$normalized_architecture.tar.gz"
elif [ -z "$runtime" ]; then
download_link="$azure_feed/Sdk/$specific_version/dotnet-sdk-$specific_version-$osname-$normalized_architecture.tar.gz" download_link="$azure_feed/Sdk/$specific_version/dotnet-sdk-$specific_version-$osname-$normalized_architecture.tar.gz"
else
return 1
fi fi
echo "$download_link" echo "$download_link"
@ -706,11 +713,14 @@ install_dotnet() {
asset_relative_path="shared/Microsoft.NETCore.App" asset_relative_path="shared/Microsoft.NETCore.App"
asset_name=".NET Core Runtime" asset_name=".NET Core Runtime"
elif [[ "$runtime" == "aspnetcore" ]]; then elif [[ "$runtime" == "aspnetcore" ]]; then
asset_relative_path="shared/Microsoft.AspNetCore.All" asset_relative_path="shared/Microsoft.AspNetCore.App"
asset_name="ASP.NET Core Runtime" asset_name="ASP.NET Core Runtime"
else elif [ -z "$runtime" ]; then
asset_relative_path="sdk" asset_relative_path="sdk"
asset_name=".NET Core SDK" asset_name=".NET Core SDK"
else
say_err "Invalid value for \$runtime"
return 1
fi fi
if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_version"; then if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_version"; then
@ -866,8 +876,8 @@ do
echo " --runtime <RUNTIME> Installs a shared runtime only, without the SDK." echo " --runtime <RUNTIME> Installs a shared runtime only, without the SDK."
echo " -Runtime" echo " -Runtime"
echo " Possible values:" echo " Possible values:"
echo " - dotnet - the Microsoft.NETCore.App shared framework" echo " - dotnet - the Microsoft.NETCore.App shared runtime"
echo " - aspnetcore - the Microsoft.AspNetCore.All shared framework" echo " - aspnetcore - the Microsoft.AspNetCore.App shared runtime"
echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable." echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable."
echo " -SkipNonVersionedFiles" echo " -SkipNonVersionedFiles"
echo " --dry-run,-DryRun Do not perform installation. Display download link." echo " --dry-run,-DryRun Do not perform installation. Display download link."