Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Commit

Permalink
Update to aspnetcore 2.1.0-preview1-28275 and react to feed layout ch…
Browse files Browse the repository at this point in the history
…anges (#8611)
  • Loading branch information
natemcmaster authored and johnbeisner committed Feb 14, 2018
1 parent 73963e8 commit 62ce305
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 25 deletions.
7 changes: 4 additions & 3 deletions build/BundledRuntimes.props
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,15 @@

<PropertyGroup>
<CoreSetupRootUrl>$(CoreSetupBlobRootUrl)Runtime/</CoreSetupRootUrl>
<AspNetCoreSharedFxRootUrl>$(CoreSetupBlobRootUrl)aspnetcore/Runtime/</AspNetCoreSharedFxRootUrl>
<CoreSetupDownloadDirectory>$(IntermediateDirectory)/coreSetupDownload/$(MicrosoftNETCoreAppPackageVersion)</CoreSetupDownloadDirectory>
<CombinedSharedHostAndFrameworkArchive>$(CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive$(ArchiveExtension)</CombinedSharedHostAndFrameworkArchive>
</PropertyGroup>

<ItemGroup>
<_DownloadAndExtractItem Include="AspNetCoreSharedFxArchiveFile"
Condition="!Exists('$(AspNetCoreSharedFxArchiveFile)')">
<Url>$(CoreSetupRootUrl)$(AspNetCoreVersion)/$(AspNetCoreSharedFxArchiveFileName)$(CoreSetupBlobAccessTokenParam)</Url>
<Url>$(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)/$(AspNetCoreSharedFxArchiveFileName)$(CoreSetupBlobAccessTokenParam)</Url>
<DownloadFileName>$(AspNetCoreSharedFxArchiveFile)</DownloadFileName>
<ExtractDestination>$(AspNetCoreSharedFxPublishDirectory)</ExtractDestination>
</_DownloadAndExtractItem>
Expand Down Expand Up @@ -98,14 +99,14 @@

<_DownloadAndExtractItem Include="DownloadedAspNetCoreSharedFxInstallerFile"
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>
<ExtractDestination></ExtractDestination>
</_DownloadAndExtractItem>

<_DownloadAndExtractItem Include="AspNetCoreSharedFxBaseRuntimeVersionFile"
Condition="!Exists('$(AspNetCoreSharedFxBaseRuntimeVersionFile)')">
<Url>$(CoreSetupRootUrl)$(AspNetCoreVersion)/$(AspNetCoreSharedFxBaseRuntimeVersionFileName)$(CoreSetupBlobAccessTokenParam)</Url>
<Url>$(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)/$(AspNetCoreSharedFxBaseRuntimeVersionFileName)$(CoreSetupBlobAccessTokenParam)</Url>
<DownloadFileName>$(AspNetCoreSharedFxBaseRuntimeVersionFile)</DownloadFileName>
<ExtractDestination></ExtractDestination>
</_DownloadAndExtractItem>
Expand Down
4 changes: 2 additions & 2 deletions build/DependencyVersions.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MicrosoftAspNetCoreAllPackageVersion>2.1.0-preview1-28263</MicrosoftAspNetCoreAllPackageVersion>
<MicrosoftAspNetCoreAppPackageVersion>2.1.0-preview1-28275</MicrosoftAspNetCoreAppPackageVersion>
<MicrosoftNETCoreAppPackageVersion>2.1.0-preview1-26116-04</MicrosoftNETCoreAppPackageVersion>
<MicrosoftNETCoreDotNetHostResolverPackageVersion>$(MicrosoftNETCoreAppPackageVersion)</MicrosoftNETCoreDotNetHostResolverPackageVersion>
<MicrosoftBuildPackageVersion>15.6.81</MicrosoftBuildPackageVersion>
Expand Down Expand Up @@ -59,7 +59,7 @@

<SharedHostVersion>$(MicrosoftNETCoreAppPackageVersion)</SharedHostVersion>
<HostFxrVersion>$(MicrosoftNETCoreAppPackageVersion)</HostFxrVersion>
<AspNetCoreVersion>$(MicrosoftAspNetCoreAllPackageVersion)</AspNetCoreVersion>
<AspNetCoreVersion>$(MicrosoftAspNetCoreAppPackageVersion)</AspNetCoreVersion>
</PropertyGroup>

<!-- infrastructure and test only dependencies -->
Expand Down
32 changes: 22 additions & 10 deletions scripts/obtain/dotnet-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
.PARAMETER Runtime
Installs just a shared runtime, not the entire SDK.
Possible values:
- dotnet
- aspnetcore
- dotnet - the Microsoft.NETCore.App shared runtime
- aspnetcore - the Microsoft.AspNetCore.App shared runtime
.PARAMETER DryRun
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
Expand Down Expand Up @@ -249,17 +249,20 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Co
if ($Runtime -eq "dotnet") {
$VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.version"
}
elseif ($Runtime) {
$VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.$Runtime.version"
elseif ($Runtime -eq "aspnetcore") {
$VersionFileUrl = "$UncachedFeed/aspnetcore/Runtime/$Channel/latest.version"
}
else {
elseif (-not $Runtime) {
if ($Coherent) {
$VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.coherent.version"
}
else {
$VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version"
}
}
else {
throw "Invalid value for `$Runtime"
}

$Response = GetHTTPResponse -Uri $VersionFileUrl
$StringContent = $Response.Content.ReadAsStringAsync().Result
Expand Down Expand Up @@ -296,12 +299,18 @@ function Get-Specific-Version-From-Version([string]$AzureFeed, [string]$Channel,
function Get-Download-Link([string]$AzureFeed, [string]$SpecificVersion, [string]$CLIArchitecture) {
Say-Invocation $MyInvocation

if ($Runtime) {
$PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/$Runtime-runtime-$SpecificVersion-win-$CLIArchitecture.zip"
if ($Runtime -eq "dotnet") {
$PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-runtime-$SpecificVersion-win-$CLIArchitecture.zip"
}
else {
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 {
throw "Invalid value for `$Runtime"
}

Say-Verbose "Constructed primary payload URL: $PayloadURL"

Expand Down Expand Up @@ -503,12 +512,15 @@ if ($Runtime -eq "dotnet") {
}
elseif ($Runtime -eq "aspnetcore") {
$assetName = "ASP.NET Core Runtime"
$dotnetPackageRelativePath = "shared\Microsoft.AspNetCore.All"
$dotnetPackageRelativePath = "shared\Microsoft.AspNetCore.App"
}
else {
elseif (-not $Runtime) {
$assetName = ".NET Core SDK"
$dotnetPackageRelativePath = "sdk"
}
else {
throw "Invalid value for `$Runtime"
}

$isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $SpecificVersion
if ($isAssetInstalled) {
Expand Down
30 changes: 20 additions & 10 deletions scripts/obtain/dotnet-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -390,14 +390,17 @@ get_latest_version_info() {
local version_file_url=null
if [[ "$runtime" == "dotnet" ]]; then
version_file_url="$uncached_feed/Runtime/$channel/latest.version"
elif [ ! -z "$runtime" ]; then
version_file_url="$uncached_feed/Runtime/$channel/latest.$runtime.version"
else
elif [[ "$runtime" == "aspnetcore" ]]; then
version_file_url="$uncached_feed/aspnetcore/Runtime/$channel/latest.version"
elif [ -z "$runtime" ]; then
if [ "$coherent" = true ]; then
version_file_url="$uncached_feed/Sdk/$channel/latest.coherent.version"
else
version_file_url="$uncached_feed/Sdk/$channel/latest.version"
fi
else
say_err "Invalid value for \$runtime"
return 1
fi
say_verbose "get_latest_version_info: latest url: $version_file_url"

Expand Down Expand Up @@ -457,10 +460,14 @@ construct_download_link() {
osname="$(get_current_os_name)" || return 1

local download_link=null
if [ ! -z "$runtime" ]; then
download_link="$azure_feed/Runtime/$specific_version/$runtime-runtime-$specific_version-$osname-$normalized_architecture.tar.gz"
else
if [[ "$runtime" == "dotnet" ]]; then
download_link="$azure_feed/Runtime/$specific_version/dotnet-runtime-$specific_version-$osname-$normalized_architecture.tar.gz"
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"
else
return 1
fi

echo "$download_link"
Expand Down Expand Up @@ -706,11 +713,14 @@ install_dotnet() {
asset_relative_path="shared/Microsoft.NETCore.App"
asset_name=".NET Core Runtime"
elif [[ "$runtime" == "aspnetcore" ]]; then
asset_relative_path="shared/Microsoft.AspNetCore.All"
asset_relative_path="shared/Microsoft.AspNetCore.App"
asset_name="ASP.NET Core Runtime"
else
elif [ -z "$runtime" ]; then
asset_relative_path="sdk"
asset_name=".NET Core SDK"
else
say_err "Invalid value for \$runtime"
return 1
fi

if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_version"; then
Expand Down Expand Up @@ -866,8 +876,8 @@ do
echo " --runtime <RUNTIME> Installs a shared runtime only, without the SDK."
echo " -Runtime"
echo " Possible values:"
echo " - dotnet - the Microsoft.NETCore.App shared framework"
echo " - aspnetcore - the Microsoft.AspNetCore.All shared framework"
echo " - dotnet - the Microsoft.NETCore.App shared runtime"
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 " -SkipNonVersionedFiles"
echo " --dry-run,-DryRun Do not perform installation. Display download link."
Expand Down

0 comments on commit 62ce305

Please sign in to comment.