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

Commit

Permalink
Merge pull request #6925 from dotnet/merges/release/2.0.0-to-master-2…
Browse files Browse the repository at this point in the history
…0170619-070044

Merge release/2.0.0 to master
  • Loading branch information
Livar authored Jun 19, 2017
2 parents 670d8f5 + 01a767c commit bd7bd69
Show file tree
Hide file tree
Showing 15 changed files with 132 additions and 42 deletions.
1 change: 1 addition & 0 deletions Microsoft.DotNet.Cli.sln
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{89905EC4
build\Test.targets = build\Test.targets
build\Version.props = build\Version.props
build\VersionBadge.props = build\VersionBadge.props
build\DerivedHostMachineInfo.props = build\DerivedHostMachineInfo.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "package", "package", "{FD7D515A-D10F-4F49-B8AE-21CF7ED071AE}"
Expand Down
11 changes: 10 additions & 1 deletion build/BundledRuntimes.props
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@

<PropertyGroup>
<AspNetCoreRuntimeInstallerBlobRootUrl>$(CoreSetupBlobRootUrl)aspnetcore/store/$(AspNetCoreRuntimeVersion)</AspNetCoreRuntimeInstallerBlobRootUrl>

<AspNetCoreSharedRuntimeVersionFileName>runtime.version</AspNetCoreSharedRuntimeVersionFileName>
<AspNetCoreSharedRuntimeVersionFile Condition=" '$(AspNetCoreSharedRuntimeVersionFileName)' != '' ">$(PackagesDirectory)/$(AspNetCoreSharedRuntimeVersionFileName)</AspNetCoreSharedRuntimeVersionFile>

<!-- Examples: Build.RS.linux.zip Build.RS.winx86.zip AspNetCorePackageStoreLibx64.wixlib -->
<AspNetCoreRuntimeInstallerArchiveFileNameOSToken Condition=" '$(HostOSName)' == 'win' ">$(HostOSName)$(Architecture)</AspNetCoreRuntimeInstallerArchiveFileNameOSToken>
<AspNetCoreRuntimeInstallerArchiveFileNameOSToken Condition=" '$(HostOSName)' == 'osx' ">$(HostOSName)</AspNetCoreRuntimeInstallerArchiveFileNameOSToken>
Expand Down Expand Up @@ -90,5 +92,12 @@
<ExtractDestination>$(AspNetRuntimePackageStorePublishDirectory)</ExtractDestination>
</_DownloadAndExtractItem>

<_DownloadAndExtractItem Include="AspNetCoreSharedRuntimeVersionFile"
Condition="!Exists('$(AspNetCoreSharedRuntimeVersionFile)')">
<Url>$(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreSharedRuntimeVersionFileName)</Url>
<DownloadFileName>$(AspNetCoreSharedRuntimeVersionFile)</DownloadFileName>
<ExtractDestination></ExtractDestination>
</_DownloadAndExtractItem>

</ItemGroup>
</Project>
8 changes: 4 additions & 4 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="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CLI_SharedFrameworkVersion>2.0.0-preview2-25407-01</CLI_SharedFrameworkVersion>
<CLI_SharedFrameworkVersion>2.0.0-preview3-25415-01</CLI_SharedFrameworkVersion>
<CLI_MSBuild_Version>15.3.0-preview-000388-01</CLI_MSBuild_Version>
<CLI_Roslyn_Version>2.3.0-beta3-61814-09</CLI_Roslyn_Version>
<CLI_DiaSymNative_Version>1.6.0-beta2-25304</CLI_DiaSymNative_Version>
Expand All @@ -10,7 +10,7 @@
<!-- We'll usually want to keep these versions in sync, but we may want to diverge in some
cases, so use separate properties but derive one from the other unless we want to
explicitly use different versions. -->
<CLI_NETSDK_Version>2.0.0-preview2-20170614-1</CLI_NETSDK_Version>
<CLI_NETSDK_Version>2.0.0-preview2-20170615-7</CLI_NETSDK_Version>
<CLI_MSBuildExtensions_Version>$(CLI_NETSDK_Version)</CLI_MSBuildExtensions_Version>

<CLI_NuGet_Version>4.3.0-preview3-4168</CLI_NuGet_Version>
Expand All @@ -23,8 +23,8 @@
<TemplateEngineVersion>1.0.0-beta2-20170608-254</TemplateEngineVersion>
<TemplateEngineTemplateVersion>1.0.0-beta2-20170612-258</TemplateEngineTemplateVersion>
<TemplateEngineTemplate2_0Version>1.0.0-beta2-20170612-258</TemplateEngineTemplate2_0Version>
<PlatformAbstractionsVersion>2.0.0-preview2-25407-01</PlatformAbstractionsVersion>
<DependencyModelVersion>2.0.0-preview2-25407-01</DependencyModelVersion>
<PlatformAbstractionsVersion>2.0.0-preview3-25415-01</PlatformAbstractionsVersion>
<DependencyModelVersion>2.0.0-preview3-25415-01</DependencyModelVersion>
<CliCommandLineParserVersion>0.1.0-alpha-142</CliCommandLineParserVersion>
<CliMigrateVersion>1.2.1-alpha-002133</CliMigrateVersion>
<MicroBuildVersion>0.2.0</MicroBuildVersion>
Expand Down
7 changes: 7 additions & 0 deletions build/DerivedHostMachineInfo.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<IsDebianBaseDistro Condition=" '$(HostOSName)' == 'ubuntu' OR '$(HostOSName)' == 'debian' ">true</IsDebianBaseDistro>
<IsRPMBasedDistro Condition=" $(HostRid.StartsWith('rhel')) ">true</IsRPMBasedDistro>
<IsLinuxDistroSpecific Condition=" ('$(IsDebianBaseDistro)' == 'true' OR '$(IsRPMBasedDistro)' == 'true') AND '$(IslinuxPortable)' != 'true' ">true</IsLinuxDistroSpecific>
</PropertyGroup>
</Project>
11 changes: 4 additions & 7 deletions build/FileExtensions.props
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
<Project>
<PropertyGroup>
<IsDebianBaseDistro Condition=" '$(HostOSName)' == 'ubuntu' OR '$(HostOSName)' == 'debian' ">True</IsDebianBaseDistro>
<IsRPMBasedDistro Condition=" $(HostRid.StartsWith('rhel')) ">True</IsRPMBasedDistro>

<ArchiveExtension Condition=" '$(HostOSName)' == 'win' ">.zip</ArchiveExtension>
<ArchiveExtension Condition=" '$(HostOSName)' != 'win' ">.tar.gz</ArchiveExtension>

<InstallerExtension Condition=" '$(HostOSName)' == 'win' ">.msi</InstallerExtension>
<InstallerExtension Condition=" '$(HostOSName)' == 'osx' ">.pkg</InstallerExtension>
<InstallerExtension Condition=" '$(IsDebianBaseDistro)' == 'True' ">.deb</InstallerExtension>
<InstallerExtension Condition=" '$(IsRPMBasedDistro)' == True ">.rpm</InstallerExtension>
<InstallerExtension Condition=" '$(IsDebianBaseDistro)' == 'true' ">.deb</InstallerExtension>
<InstallerExtension Condition=" '$(IsRPMBasedDistro)' == true ">.rpm</InstallerExtension>

<BundleExtension Condition=" '$(HostOSName)' == 'win' ">.exe</BundleExtension>
<BundleExtension Condition=" '$(HostOSName)' == 'osx' ">$(InstallerExtension)</BundleExtension>
<BundleExtension Condition=" '$(IsDebianBaseDistro)' == 'True' ">$(InstallerExtension)</BundleExtension>
<BundleExtension Condition=" '$(IsRPMBasedDistro)' == True ">$(InstallerExtension)</BundleExtension>
<BundleExtension Condition=" '$(IsDebianBaseDistro)' == 'true' ">$(InstallerExtension)</BundleExtension>
<BundleExtension Condition=" '$(IsRPMBasedDistro)' == true ">$(InstallerExtension)</BundleExtension>

<DynamicLibPrefix>lib</DynamicLibPrefix>
<DynamicLibPrefix Condition=" '$(HostOSName)' == 'win' "></DynamicLibPrefix>
Expand Down
9 changes: 6 additions & 3 deletions build/Publish.targets
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@

<Target Name="GatherItemsForPattern">
<ItemGroup>
<ForPublishing Include="@(GeneratedInstallers)" />
<ForPublishing Include="%(GenerateArchivesInputsOutputs.Outputs)" />
<ForPublishing Include="$(PackagesDirectory)/Microsoft*.nupkg" Condition=" '$(PUBLISH_NUPKG_TO_AZURE_BLOB)' != '' " />
<ForPublishing Include="@(GeneratedInstallers)"
Condition=" '$(IslinuxPortable)' != 'true' "/>
<ForPublishing Include="%(GenerateArchivesInputsOutputs.Outputs)"
Condition=" '$(IsLinuxDistroSpecific)' != 'true' "/>
<ForPublishing Include="$(PackagesDirectory)/Microsoft*.nupkg"
Condition=" '$(PUBLISH_NUPKG_TO_AZURE_BLOB)' != '' AND '$(IsLinuxDistroSpecific)' != 'true'"/>
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions build/package/Installer.DEB.proj
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@

<Target Name="TestSdkDeb"
Condition=" '$(IsDebianBaseDistro)' == 'True' and '$(DebuildPresent)' == 'true' "
DependsOnTargets="RestoreTests"
Inputs="$(DownloadedSharedHostInstallerFile);
$(DownloadedHostFxrInstallerFile);
$(DownloadedSharedFrameworkInstallerFile);
Expand Down
1 change: 1 addition & 0 deletions build/package/Installer.RPM.targets
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
</Target>

<Target Name="TestSdkRpm"
DependsOnTargets="RestoreTests"
Condition=" '$(IsRPMBasedDistro)' == 'True' and '$(FPMPresent)' == 'True' "
Inputs="$(DownloadedSharedHostInstallerFile);
$(DownloadedHostFxrInstallerFile);
Expand Down
28 changes: 26 additions & 2 deletions build/publish/FinishBuild.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="FinishBuild"
DependsOnTargets="CheckIfAllBuildsHavePublished;
EvaluateRuntimeCoherence;
FinalizeBuild" />

<Target Name="CheckIfAllBuildsHavePublished">
Expand All @@ -14,21 +15,44 @@
</CheckIfAllBuildsHavePublished>
</Target>

<Target Name="EvaluateRuntimeCoherence"
DependsOnTargets="ReadAspNetCoreSharedRuntimeVersionFile"
BeforeTargets="FinalizeBuild">
<PropertyGroup>
<Coherent>false</Coherent>
<Coherent Condition=" '$(CLI_SharedFrameworkVersion)' == '@(AspNetCoreSharedRuntimeVersion)' ">true</Coherent>
</PropertyGroup>
</Target>

<Target Name="ReadAspNetCoreSharedRuntimeVersionFile"
DependsOnTargets="DownloadHostAndSharedFxArtifacts">
<ItemGroup>
<File Include="$(AspNetCoreSharedRuntimeVersionFile)" />
</ItemGroup>
<ReadLinesFromFile File="@(File)">
<Output
TaskParameter="Lines"
ItemName="AspNetCoreSharedRuntimeVersion"/>
</ReadLinesFromFile>
</Target>

<Target Name="FinalizeBuild"
Condition=" '$(HaveAllBuildsPublished)' == 'True' ">
<CopyBlobsToLatest AccountName="$(ArtifactCloudDropAccountName)"
AccountKey="$(ArtifactCloudDropAccessToken)"
ContainerName="$(ArtifactContainerName)"
NugetVersion="$(FullNugetVersion)"
Channel="$(Channel)"
CommitHash="$(CommitHash)" />
CommitHash="$(CommitHash)"
Coherent="$(Coherent)" />

<CopyBlobsToLatest AccountName="$(ChecksumCloudDropAccountName)"
AccountKey="$(ChecksumCloudDropAccessToken)"
ContainerName="$(ChecksumContainerName)"
NugetVersion="$(FullNugetVersion)"
Channel="$(Channel)"
CommitHash="$(CommitHash)" />
CommitHash="$(CommitHash)"
Coherent="$(Coherent)" />

<!-- Uncomment the line below when https://github.com/dotnet/buildtools/issues/1547 gets fixed. -->
<!-- <UpdateVersionsRepo BranchName="$(BranchName)"
Expand Down
6 changes: 6 additions & 0 deletions build_projects/dotnet-cli-build/CopyBlobsToLatest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public class CopyBlobsToLatest : Task
[Required]
public string NugetVersion { get; set; }

public bool Coherent { get; set; }

private AzurePublisher AzurePublisherTool
{
get
Expand Down Expand Up @@ -81,6 +83,10 @@ public override bool Execute()

string cliVersion = Utils.GetVersionFileContent(CommitHash, NugetVersion);
AzurePublisherTool.PublishStringToBlob($"{targetFolder}/latest.version", cliVersion);
if (Coherent == true)
{
AzurePublisherTool.PublishStringToBlob($"{targetFolder}/latest.coherent.version", cliVersion);
}
}
finally
{
Expand Down
1 change: 1 addition & 0 deletions dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<Import Project="build/Version.props" />
<Import Project="build/Branding.props" />

<Import Project="build/DerivedHostMachineInfo.props" />
<Import Project="build/FileExtensions.props" />
<Import Project="build/InputDirectories.props" />
<Import Project="build/MSBuildExtensions.props" />
Expand Down
2 changes: 1 addition & 1 deletion run-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ while [[ $# > 0 ]]; do
;;
--linux-portable)
LINUX_PORTABLE_INSTALL_ARGS="--runtime-id linux-x64"
CUSTOM_BUILD_ARGS="/p:Rid=\"linux-x64\" /p:OSName=\"linux\""
CUSTOM_BUILD_ARGS="/p:Rid=\"linux-x64\" /p:OSName=\"linux\" /p:IslinuxPortable=\"true\""
args=( "${args[@]/$1}" )
;;
--help)
Expand Down
37 changes: 27 additions & 10 deletions scripts/obtain/dotnet-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@
it will update it only if the requested version differs from the one already installed.
.PARAMETER Channel
Default: LTS
Download from the Channel specified
Download from the Channel specified. Possible values:
- Current - most current release
- LTS - most current supported release
- 2-part version in a format A.B - represents a specific release
examples: 2.0; 1.0
- Branch name
examples: release/2.0.0; Master
.PARAMETER Version
Default: latest
Represents a build version on specific channel. Possible values:
- latest - most latest build on specific channel
- coherent - most latest coherent build on specific channel
coherent applies only to SDK downloads
- 3-part version in a format A.B.C - represents specific version of build
examples: 2.0.0-preview2-006120; 1.1.0
examples: 2.0.0-preview2-006120; 1.1.0
.PARAMETER InstallDir
Default: %LocalAppData%\Microsoft\dotnet
Path to where to install dotnet. Note that binaries will be placed directly in a given directory.
Expand All @@ -28,8 +36,6 @@
.PARAMETER SharedRuntime
Default: false
Installs just the shared runtime bits, not the entire SDK
.PARAMETER DebugSymbols
If set the installer will include symbols in the installation.
.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 @@ -60,7 +66,6 @@ param(
[string]$InstallDir="<auto>",
[string]$Architecture="<auto>",
[switch]$SharedRuntime,
[switch]$DebugSymbols, # TODO: Switch does not work yet. Symbols zip is not being uploaded yet.
[switch]$DryRun,
[switch]$NoPath,
[string]$AzureFeed="https://dotnetcli.azureedge.net/dotnet",
Expand Down Expand Up @@ -207,15 +212,20 @@ function GetHTTPResponse([Uri] $Uri)
}


function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel) {
function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Coherent) {
Say-Invocation $MyInvocation

$VersionFileUrl = $null
if ($SharedRuntime) {
$VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.version"
}
else {
$VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version"
if ($Coherent) {
$VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.coherent.version"
}
else {
$VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version"
}
}

$Response = GetHTTPResponse -Uri $VersionFileUrl
Expand All @@ -239,7 +249,11 @@ function Get-Specific-Version-From-Version([string]$AzureFeed, [string]$Channel,

switch ($Version.ToLower()) {
{ $_ -eq "latest" } {
$LatestVersionInfo = Get-Latest-Version-Info -AzureFeed $AzureFeed -Channel $Channel
$LatestVersionInfo = Get-Latest-Version-Info -AzureFeed $AzureFeed -Channel $Channel -Coherent $False
return $LatestVersionInfo.Version
}
{ $_ -eq "coherent" } {
$LatestVersionInfo = Get-Latest-Version-Info -AzureFeed $AzureFeed -Channel $Channel -Coherent $True
return $LatestVersionInfo.Version
}
default { return $Version }
Expand Down Expand Up @@ -464,14 +478,17 @@ if ($free.Freespace / 1MB -le 100 ) {
}

$ZipPath = [System.IO.Path]::GetTempFileName()
Say "Downloading $DownloadLink"
Say-Verbose "Zip path: $ZipPath"
Say "Downloading link: $DownloadLink"
try {
DownloadFile -Uri $DownloadLink -OutPath $ZipPath
}
catch {
Say "Cannot download: $DownloadLink"
$DownloadLink = $LegacyDownloadLink
$ZipPath = [System.IO.Path]::GetTempFileName()
Say "Downloading $DownloadLink"
Say-Verbose "Legacy zip path: $ZipPath"
Say "Downloading legacy link: $DownloadLink"
DownloadFile -Uri $DownloadLink -OutPath $ZipPath
}

Expand Down
Loading

0 comments on commit bd7bd69

Please sign in to comment.