Fix host version through out the builds.

Refactor HostVersion into its own class and use it everywhere host
artifacts are created. This includes the
- host nuget packages
- host installers (msi, pkg, deb)
This commit is contained in:
Sridhar Periyasamy 2016-05-03 19:41:48 -07:00 committed by Bryan
parent e77c92e819
commit a01fda9856
9 changed files with 130 additions and 104 deletions

View file

@ -138,6 +138,9 @@ namespace Microsoft.DotNet.Cli.Build
[BuildPlatforms(BuildPlatform.Windows)]
public static BuildTargetResult GenerateDotnetSharedHostMsi(BuildTargetContext c)
{
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
var hostMsiVersion = hostVersion.GenerateMsiVersion();
var hostNugetVersion = hostVersion.LockedHostVersion;
var inputDir = c.BuildContext.Get<string>("SharedHostPublishRoot");
var wixObjRoot = Path.Combine(Dirs.Output, "obj", "wix", "sharedhost");
var sharedHostBrandName = $"'{Monikers.SharedHostBrandName}'";
@ -150,7 +153,7 @@ namespace Microsoft.DotNet.Cli.Build
Cmd("powershell", "-NoProfile", "-NoLogo",
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "host", "generatemsi.ps1"),
inputDir, SharedHostMsi, WixRoot, sharedHostBrandName, MsiVersion, CliNugetVersion, Arch, wixObjRoot)
inputDir, SharedHostMsi, WixRoot, sharedHostBrandName, hostMsiVersion, hostNugetVersion, Arch, wixObjRoot)
.Execute()
.EnsureSuccessful();
return c.Success();