Publish the combined-zip/tar files to azure

This commit is contained in:
Eric Mellino 2016-03-15 17:41:42 -07:00
parent 4fcabc47cc
commit d9dfaf1328

View file

@ -49,6 +49,8 @@ namespace Microsoft.DotNet.Cli.Build
nameof(PublishTargets.PublishDebFileToDebianRepo),
nameof(PublishTargets.PublishSharedFrameworkCompressedFile),
nameof(PublishTargets.PublishSharedHostCompressedFile),
nameof(PublishTargets.PublishCombinedFrameworkSDKHostFile),
nameof(PublishTargets.PublishCombinedFrameworkHostFile),
nameof(PublishTargets.PublishLatestVersionTextFile))]
public static BuildTargetResult PublishArtifacts(BuildTargetContext c)
{
@ -169,6 +171,32 @@ namespace Microsoft.DotNet.Cli.Build
return c.Success();
}
[Target]
public static BuildTargetResult PublishCombinedFrameworkSDKHostFile(BuildTargetContext c)
{
var compressedFile = c.BuildContext.Get<string>("CombinedFrameworkSDKHostCompressedFile");
var compressedFileBlob = $"{Channel}/Binaries/{Version}/{Path.GetFileName(compressedFile)}";
var latestCompressedFile = compressedFile.Replace(Version, "latest");
var latestCompressedFileBlob = $"{Channel}/Binaries/Latest/{Path.GetFileName(latestCompressedFile)}";
PublishFileAzure(compressedFileBlob, compressedFile);
PublishFileAzure(latestCompressedFileBlob, compressedFile);
return c.Success();
}
[Target]
public static BuildTargetResult PublishCombinedFrameworkHostFile(BuildTargetContext c)
{
var compressedFile = c.BuildContext.Get<string>("CombinedFrameworkHostCompressedFile");
var compressedFileBlob = $"{Channel}/Binaries/{Version}/{Path.GetFileName(compressedFile)}";
var latestCompressedFile = compressedFile.Replace(Version, "latest");
var latestCompressedFileBlob = $"{Channel}/Binaries/Latest/{Path.GetFileName(latestCompressedFile)}";
PublishFileAzure(compressedFileBlob, compressedFile);
PublishFileAzure(latestCompressedFileBlob, compressedFile);
return c.Success();
}
private static BuildTargetResult PublishFile(BuildTargetContext c, string file)
{
var env = PackageTargets.GetCommonEnvVars(c);