Merge pull request #2703 from sokket/publish

Fixing publish scripts to only push to Latest when all bits are there
This commit is contained in:
Piotr Puszkiewicz 2016-04-28 16:20:40 -07:00
commit 6cd56257fc
3 changed files with 201 additions and 59 deletions

View file

@ -3,6 +3,8 @@ using System.IO;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using Microsoft.DotNet.Cli.Build.Framework;
namespace Microsoft.DotNet.Cli.Build
{
public static class Utils
@ -133,5 +135,18 @@ namespace Microsoft.DotNet.Cli.Build
File.Copy(file, destFile, true);
}
}
public static string GetSharedFrameworkVersionFileContent(BuildTargetContext c)
{
string SharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
return $@"{c.BuildContext["CommitHash"]}{Environment.NewLine}{SharedFrameworkNugetVersion}{Environment.NewLine}";
}
public static string GetCliVersionFileContent(BuildTargetContext c)
{
var buildVersion = c.BuildContext.Get<BuildVersion>("BuildVersion");
var version = buildVersion.NuGetVersion;
return $@"{c.BuildContext["CommitHash"]}{Environment.NewLine}{version}{Environment.NewLine}";
}
}
}