Enabling the upgrade of the SDK bundle in a product-band (#530)

* Enabling the 'upgrade' of the SDK bundle in a 'product-band'.
This commit is contained in:
John Beisner 2019-02-19 14:21:54 -08:00 committed by GitHub
parent 77e2c4baa5
commit 131cc45593
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 36 additions and 9 deletions

View file

@ -23,6 +23,7 @@ namespace Microsoft.DotNet.Cli.Build
return true;
}
// Generate a Version 5 (SHA1 Name Based) Guid from a name.
public static Guid GenerateGuid(string name)
{
// Any fixed GUID will do for a namespace.

View file

@ -32,6 +32,7 @@
<PropertyGroup>
<SdkMSIInstallerFile>$(ArtifactsShippingPackagesDir)$(ArtifactNameWithVersionSdk)$(InstallerExtension)</SdkMSIInstallerFile>
<CombinedFrameworkSdkHostMSIInstallerFile>$(ArtifactsShippingPackagesDir)$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension)</CombinedFrameworkSdkHostMSIInstallerFile>
<SdkBundleInstallerOutputGuidString>$(ProductBandCombinedHostHostFxrFrameworkSdkName)</SdkBundleInstallerOutputGuidString>
<!--<SdkDebianIntermediateDirectory>$(IntermediateOutputPath)debian/sdk/</SdkDebianIntermediateDirectory>
<LayoutDirectory Condition=" '$(OSName)' == 'ubuntu' OR '$(OSName)' == 'debian' ">$(SdkDebianIntermediateDirectory)debianLayoutDirectory</LayoutDirectory>
@ -66,7 +67,7 @@
PropertyName="SdkInstallerUpgradeCode" />
</GenerateGuidFromName>
<GenerateGuidFromName Name="$(CombinedFrameworkSdkHostMSIInstallerFile)">
<GenerateGuidFromName Name="$(SdkBundleInstallerOutputGuidString)">
<Output TaskParameter="OutputGuid"
PropertyName="CombinedFrameworkSDKHostInstallerUpgradeCode" />
</GenerateGuidFromName>
@ -144,6 +145,7 @@
'$(Architecture)' ^
'$(MicrosoftNETCoreAppPackageVersion)' ^
'$(AspNetCoreVersion)' ^
'$(CliProductBandVersion)' ^
-InformationAction Continue " />
</Target>

View file

@ -47,8 +47,11 @@
<ArtifactNameWithVersionSdk>$(ArtifactNameSdk)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdk>
<ArtifactNameWithVersionMSBuildExtensions>dotnet-standard-support-vs2015-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionMSBuildExtensions>
<ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
<!-- Warning: changing the value "ProductBandCombinedHostHostFxrFrameworkSdkName" can only occur on a product-band boundary [CliProductBandVersion],
Changing "ProductBandCombinedHostHostFxrFrameworkSdkName" mid-product-band will break the upgradablilty of the SDK bundle installer. -->
<ProductBandCombinedHostHostFxrFrameworkSdkName>Dotnet SDK Bundle Installer $(CliProductBandVersion) $(ProductMonikerRid)</ProductBandCombinedHostHostFxrFrameworkSdkName>
<DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-</DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid>
<DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid)$(HostMonikerRidForFileName)</DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
</PropertyGroup>
</PropertyGroup>
</Target>
</Project>

View file

@ -2,7 +2,8 @@
<PropertyGroup>
<VersionMajor>3</VersionMajor>
<VersionMinor>0</VersionMinor>
<VersionPatch>100</VersionPatch>
<VersionSDKMinor>1</VersionSDKMinor>
<VersionPatch>00</VersionPatch>
<ReleaseSuffix Condition=" '$(ReleaseSuffix)' == '' ">preview3</ReleaseSuffix>
</PropertyGroup>
@ -27,7 +28,8 @@
<Target Name="SetSdkVersionInfo" DependsOnTargets="GetCoreSdkGitCommitInfo">
<PropertyGroup>
<MajorMinorVersion>$(VersionMajor).$(VersionMinor)</MajorMinorVersion>
<CliVersionNoSuffix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</CliVersionNoSuffix>
<CliProductBandVersion>$(MajorMinorVersion).$(VersionSDKMinor)</CliProductBandVersion>
<CliVersionNoSuffix>$(CliProductBandVersion)$(VersionPatch)</CliVersionNoSuffix>
<CliVersionPrefix>$(CliVersionNoSuffix)-$(ReleaseSuffix)</CliVersionPrefix>
<CliBrandingVersion Condition=" '$(DropSuffix)' != 'true' ">$(CliVersionNoSuffix) - $(ReleaseSuffix)</CliBrandingVersion>
<CliBrandingVersion Condition=" '$(DropSuffix)' == 'true' ">$(CliVersionNoSuffix)</CliBrandingVersion>

View file

@ -10,10 +10,27 @@
AboutUrl="https://dotnet.github.io/"
Compressed="yes">
<bal:Condition Message="The installation path for x64 SDK installations: &quot;[DOTNETHOME_X64]&quot; cannot be the same as for x86 SDK installations: &quot;[DOTNETHOME_X64]&quot;">
<bal:Condition Message="The installation path for x64 SDK installations: &quot;[DOTNETHOME_X64]&quot; cannot be the same as for x86 SDK installations: &quot;[DOTNETHOME_X86]&quot;">
WixBundleInstalled OR ((NOT (DOTNETHOME_X64 ~= DOTNETHOME_X86)) OR DOTNETHOMESIMILARITYCHECKOVERRIDE)
</bal:Condition>
<!-- ***** When the product-band version: "3.0.1xx" advances, remove this section ***** -->
<?if $(var.SDKProductBandVersion)=3.0.1?>
<?if $(var.Platform)~=x86?>
<!-- "Preview 1" 3.0.100-preview-009812-win-x86 upgrade-code -->
<RelatedBundle Action="Upgrade" Id="{489A47A1-5D69-51F1-3D54-3F8FE92E0963}"/>
<!-- "Preview 2" 3.0.100-preview-010184-win-x86 upgrade-code -->
<RelatedBundle Action="Upgrade" Id="{C1DD86C1-5FE4-573E-63FF-6BD0F23EBE69}"/>
<?endif?>
<?if $(var.Platform)~=x64?>
<!-- "Preview 1" 3.0.100-preview-009812-win-x64 upgrade-code -->
<RelatedBundle Action="Upgrade" Id="{18D28236-562F-73EB-340C-2B4B3A5347BB}"/>
<!-- "Preview 2" 3.0.100-preview-010184-win-x64 upgrade-code -->
<RelatedBundle Action="Upgrade" Id="{B47FC45A-5547-64E8-CFD1-B4C5CA275757}"/>
<?endif?>
<?endif?>
<!-- ********************************************************************************** -->
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.Foundation">
<bal:WixStandardBootstrapperApplication
LicenseFile="dummyeula.rtf"
@ -80,7 +97,7 @@
Path="[ProgramFiles64Folder]dotnet"/>
<!--
When installing the SDK bundle to a custom location using the commandline parameters, it is intended that
When installing the SDK bundle to a custom location using the commandline parameters, it is intended, not mandatory, that
both "DOTNETHOME_X86" and "DOTNETHOME_X64" should be used on the commandline and should take this convention:
DOTNETHOME_X86=<InstallFolder>\x86
DOTNETHOME_X64=<InstallFolder>\x64
@ -91,7 +108,7 @@
<Variable Name="DOTNETHOME_X64" Type="string" Value="[ProgramFiles64Folder]dotnet" bal:Overridable="yes" />
<Variable Name="DOTNETHOME" Type="string" Value="[DOTNETHOME_$(var.PlatformToken)]" bal:Overridable="no" />
<Variable Name="BUNDLEMONIKER" Type="string" Value="$(var.ProductMoniker)" bal:Overridable="no" />
<Variable Name="DOTNETSDKVERSION" Type="string" Value="$(var.DisplayVersion)" bal:Overridable="no" />
<Variable Name="DOTNETSDKVERSION" Type="string" Value="$(var.NugetVersion)" bal:Overridable="no" />
<Variable Name="DOTNETRUNTIMEVERSION" Type="string" Value="$(var.DotNetRuntimeVersion)" bal:Overridable="no" />
<Variable Name="ASPNETCOREVERSION" Type="string" Value="$(var.AspNetCoreVersion)" bal:Overridable="no" />
<Variable Name="WINFORMSANDWPFVERSION" Type="string" Value="$(var.WinFormsAndWpfVersion)" bal:Overridable="no" />

View file

@ -18,7 +18,8 @@ param(
[Parameter(Mandatory=$true)][string]$UpgradeCode,
[Parameter(Mandatory=$true)][string]$Architecture,
[Parameter(Mandatory=$true)][string]$DotNetRuntimeVersion,
[Parameter(Mandatory=$true)][string]$AspNetCoreVersion
[Parameter(Mandatory=$true)][string]$AspNetCoreVersion,
[Parameter(Mandatory=$true)][string]$SDKProductBandVersion
)
function RunCandleForBundle
@ -35,6 +36,7 @@ function RunCandleForBundle
-dProductMoniker="$ProductMoniker" `
-dBuildVersion="$DotnetMSIVersion" `
-dDisplayVersion="$DotnetCLIDisplayVersion" `
-dSDKProductBandVersion="$SDKProductBandVersion" `
-dNugetVersion="$DotnetCLINugetVersion" `
-dCLISDKMsiSourcePath="$CLISDKMSIFile" `
-dUpgradeCode="$UpgradeCode" `