Fix PublishTargets to use the correct Shared Host Nuget Version.
Also update the VersionSuffix to use the ReleaseSuffix as before.
This commit is contained in:
parent
d1cd3703ac
commit
8b55c50011
3 changed files with 15 additions and 10 deletions
|
@ -26,6 +26,8 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
private static string SharedFrameworkNugetVersion { get; set; }
|
private static string SharedFrameworkNugetVersion { get; set; }
|
||||||
|
|
||||||
|
private static string SharedHostNugetVersion { get; set; }
|
||||||
|
|
||||||
[Target]
|
[Target]
|
||||||
public static BuildTargetResult InitPublish(BuildTargetContext c)
|
public static BuildTargetResult InitPublish(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
|
@ -35,6 +37,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
CliVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").SimpleVersion;
|
CliVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").SimpleVersion;
|
||||||
CliNuGetVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
CliNuGetVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
||||||
SharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
SharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||||
|
SharedHostNugetVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostVersion;
|
||||||
Channel = c.BuildContext.Get<string>("Channel");
|
Channel = c.BuildContext.Get<string>("Channel");
|
||||||
|
|
||||||
return c.Success();
|
return c.Success();
|
||||||
|
@ -87,14 +90,17 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
// Copy the latest CLI bits
|
// Copy the latest CLI bits
|
||||||
CopyBlobs($"{Channel}/Binaries/{CliNuGetVersion}/", targetContainer);
|
CopyBlobs($"{Channel}/Binaries/{CliNuGetVersion}/", targetContainer);
|
||||||
|
|
||||||
|
// Copy the shared framework
|
||||||
|
CopyBlobs($"{Channel}/Binaries/{SharedFrameworkNugetVersion}/", targetContainer);
|
||||||
|
|
||||||
// Copy the latest installer files
|
// Copy the latest installer files
|
||||||
CopyBlobs($"{Channel}/Installers/{CliNuGetVersion}/", $"{Channel}/Installers/Latest/");
|
CopyBlobs($"{Channel}/Installers/{CliNuGetVersion}/", $"{Channel}/Installers/Latest/");
|
||||||
|
|
||||||
// Copy the shared framework installers
|
// Copy the shared framework installers
|
||||||
CopyBlobs($"{Channel}/Installers/{SharedFrameworkNugetVersion}/", $"{Channel}/Installers/Latest/");
|
CopyBlobs($"{Channel}/Installers/{SharedFrameworkNugetVersion}/", $"{Channel}/Installers/Latest/");
|
||||||
|
|
||||||
// Copy the shared framework
|
// Copy the shared host installers
|
||||||
CopyBlobs($"{Channel}/Binaries/{SharedFrameworkNugetVersion}/", targetContainer);
|
CopyBlobs($"{Channel}/Installers/{SharedHostNugetVersion}/", $"{Channel}/Installers/Latest/");
|
||||||
|
|
||||||
// Generate the CLI and SDK Version text files
|
// Generate the CLI and SDK Version text files
|
||||||
List<string> versionFiles = new List<string>() { "win.x86.version", "win.x64.version", "ubuntu.x64.version", "rhel.x64.version", "osx.x64.version", "debian.x64.version", "centos.x64.version" };
|
List<string> versionFiles = new List<string>() { "win.x86.version", "win.x64.version", "ubuntu.x64.version", "rhel.x64.version", "osx.x64.version", "debian.x64.version", "centos.x64.version" };
|
||||||
|
@ -122,7 +128,8 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
string source = blob.Replace("/dotnet/", "");
|
string source = blob.Replace("/dotnet/", "");
|
||||||
string targetName = Path.GetFileName(blob)
|
string targetName = Path.GetFileName(blob)
|
||||||
.Replace(CliNuGetVersion, "latest")
|
.Replace(CliNuGetVersion, "latest")
|
||||||
.Replace(SharedFrameworkNugetVersion, "latest");
|
.Replace(SharedFrameworkNugetVersion, "latest")
|
||||||
|
.Replace(SharedHostNugetVersion, "latest");
|
||||||
string target = $"{destinationFolder}{targetName}";
|
string target = $"{destinationFolder}{targetName}";
|
||||||
AzurePublisherTool.CopyBlob(source, target);
|
AzurePublisherTool.CopyBlob(source, target);
|
||||||
}
|
}
|
||||||
|
@ -232,7 +239,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Windows)]
|
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Windows)]
|
||||||
public static BuildTargetResult PublishSharedHostInstallerFileToAzure(BuildTargetContext c)
|
public static BuildTargetResult PublishSharedHostInstallerFileToAzure(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
var version = CliNuGetVersion;
|
var version = SharedHostNugetVersion;
|
||||||
var installerFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
|
var installerFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
|
||||||
|
|
||||||
if (CurrentPlatform.Current == BuildPlatform.Windows)
|
if (CurrentPlatform.Current == BuildPlatform.Windows)
|
||||||
|
@ -377,7 +384,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||||
public static BuildTargetResult PublishSharedHostDebToDebianRepo(BuildTargetContext c)
|
public static BuildTargetResult PublishSharedHostDebToDebianRepo(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
var version = CliNuGetVersion;
|
var version = SharedHostNugetVersion;
|
||||||
|
|
||||||
var packageName = Monikers.GetDebianSharedHostPackageName(c);
|
var packageName = Monikers.GetDebianSharedHostPackageName(c);
|
||||||
var installerFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
|
var installerFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
public class BuildVersion : Version
|
public class BuildVersion : Version
|
||||||
{
|
{
|
||||||
public string SimpleVersion => $"{Major}.{Minor}.{Patch}.{CommitCountString}";
|
public string SimpleVersion => $"{Major}.{Minor}.{Patch}.{CommitCountString}";
|
||||||
public string VersionSuffix => $"{CommitCountString}";
|
public string VersionSuffix => $"{ReleaseSuffix}-{CommitCountString}";
|
||||||
public string NuGetVersion => $"{Major}.{Minor}.{Patch}-{VersionSuffix}";
|
public string NuGetVersion => $"{Major}.{Minor}.{Patch}-{VersionSuffix}";
|
||||||
public string NetCoreAppVersion => $"{Major}.{Minor}.{Patch}-rc2-3{CommitCountString}";
|
public string NetCoreAppVersion => $"{Major}.{Minor}.{Patch}-rc2-3{CommitCountString}";
|
||||||
public string ProductionVersion => $"{Major}.{Minor}.{Patch}";
|
public string ProductionVersion => $"{Major}.{Minor}.{Patch}";
|
||||||
|
|
|
@ -76,8 +76,6 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
public static string GetDebianSharedHostPackageName(BuildTargetContext c)
|
public static string GetDebianSharedHostPackageName(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
var sharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
|
||||||
|
|
||||||
return $"dotnet-host".ToLower();
|
return $"dotnet-host".ToLower();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue