Publish and Pkg, Deb fixes
- Publish only combined SharedFx,SharedHost and combined SharedFx,SharedHost,CLISDK tarballs and zips.
This commit is contained in:
parent
5150bae60c
commit
9602d92634
3 changed files with 14 additions and 54 deletions
|
@ -37,7 +37,8 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
var channel = c.BuildContext.Get<string>("Channel").ToLower();
|
||||
var packageName = Monikers.GetDebianPackageName(c);
|
||||
var version = c.BuildContext.Get<BuildVersion>("BuildVersion").SimpleVersion;
|
||||
var debFile = c.BuildContext.Get<string>("SdkInstallerFile");
|
||||
var debFile = c.BuildContext.Get<string>("CombinedFrameworkSDKHostInstallerFile");
|
||||
var input = c.BuildContext.Get<string>("CLISDKRoot");
|
||||
var manPagesDir = Path.Combine(Dirs.RepoRoot, "Documentation", "manpages");
|
||||
var previousVersionURL = $"https://dotnetcli.blob.core.windows.net/dotnet/{channel}/Installers/Latest/dotnet-ubuntu-x64.latest.deb";
|
||||
|
||||
|
@ -51,7 +52,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
Directory.CreateDirectory(objRoot);
|
||||
|
||||
Cmd(Path.Combine(Dirs.RepoRoot, "scripts", "package", "package-debian.sh"),
|
||||
"-v", version, "-i", Dirs.Stage2, "-o", debFile, "-p", packageName, "-m", manPagesDir, "--previous-version-url", previousVersionURL, "--obj-root", objRoot)
|
||||
"-v", version, "-i", input, "-o", debFile, "-p", packageName, "-m", manPagesDir, "--previous-version-url", previousVersionURL, "--obj-root", objRoot)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
return c.Success();
|
||||
|
|
|
@ -24,10 +24,11 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
public static BuildTargetResult GenerateSdkProductArchive(BuildTargetContext c)
|
||||
{
|
||||
var version = c.BuildContext.Get<BuildVersion>("BuildVersion").SimpleVersion;
|
||||
var pkg = c.BuildContext.Get<string>("SdkInstallerFile");
|
||||
var pkg = c.BuildContext.Get<string>("CombinedFrameworkSDKHostInstallerFile");
|
||||
var input = c.BuildContext.Get<string>("CLISDKRoot");
|
||||
|
||||
Cmd(Path.Combine(Dirs.RepoRoot, "packaging", "osx", "package-osx.sh"),
|
||||
"-v", version, "-i", Dirs.Stage2, "-o", pkg)
|
||||
"-v", version, "-i", input, "-o", pkg)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
return c.Success();
|
||||
|
|
|
@ -44,11 +44,8 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
}
|
||||
|
||||
[Target(nameof(PublishTargets.PublishVersionBadge),
|
||||
nameof(PublishTargets.PublishCompressedFile),
|
||||
nameof(PublishTargets.PublishSdkInstallerFile),
|
||||
nameof(PublishTargets.PublishDebFileToDebianRepo),
|
||||
nameof(PublishTargets.PublishSharedFrameworkCompressedFile),
|
||||
nameof(PublishTargets.PublishSharedHostCompressedFile),
|
||||
nameof(PublishTargets.PublishCombinedFrameworkSDKHostFile),
|
||||
nameof(PublishTargets.PublishCombinedFrameworkHostFile),
|
||||
nameof(PublishTargets.PublishLatestVersionTextFile))]
|
||||
|
@ -69,24 +66,11 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult PublishCompressedFile(BuildTargetContext c)
|
||||
{
|
||||
var compressedFile = c.BuildContext.Get<string>("SdkCompressedFile");
|
||||
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]
|
||||
[BuildPlatforms(BuildPlatform.Windows, BuildPlatform.OSX, BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult PublishSdkInstallerFile(BuildTargetContext c)
|
||||
{
|
||||
var installerFile = c.BuildContext.Get<string>("SdkInstallerFile");
|
||||
var installerFile = c.BuildContext.Get<string>("CombinedFrameworkSDKHostInstallerFile");
|
||||
var installerFileBlob = $"{Channel}/Installers/{Version}/{Path.GetFileName(installerFile)}";
|
||||
var latestInstallerFile = installerFile.Replace(Version, "latest");
|
||||
var latestInstallerFileBlob = $"{Channel}/Installers/Latest/{Path.GetFileName(latestInstallerFile)}";
|
||||
|
@ -113,7 +97,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
var packageName = Monikers.GetDebianPackageName(c);
|
||||
var installerFile = c.BuildContext.Get<string>("SdkInstallerFile");
|
||||
var uploadUrl = $"https://dotnetcli.blob.core.windows.net/dotnet/{Channel}/Installers/{Version}/{Path.GetFileName(installerFile)}";
|
||||
var uploadUrl = $"https://dotnetcli.blob.core.windows.net/dotnet/{Channel}/Installers/{Version}/{Path.GetFileName(installerFile)}";
|
||||
var uploadJson = GenerateUploadJsonFile(packageName, Version, uploadUrl);
|
||||
|
||||
Cmd(Path.Combine(Dirs.RepoRoot, "scripts", "publish", "repoapi_client.sh"), "-addpkg", uploadJson)
|
||||
|
@ -133,44 +117,18 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
using (StreamWriter sw = new StreamWriter(fileStream))
|
||||
{
|
||||
sw.WriteLine("{");
|
||||
sw.WriteLine($" \"name\":\"{packageName}\",");
|
||||
sw.WriteLine($" \"version\":\"{version}\",");
|
||||
sw.WriteLine($" \"repositoryId\":\"{repoID}\",");
|
||||
sw.WriteLine($" \"sourceUrl\":\"{uploadUrl}\"");
|
||||
sw.WriteLine("}");
|
||||
sw.WriteLine("{");
|
||||
sw.WriteLine($" \"name\":\"{packageName}\",");
|
||||
sw.WriteLine($" \"version\":\"{version}\",");
|
||||
sw.WriteLine($" \"repositoryId\":\"{repoID}\",");
|
||||
sw.WriteLine($" \"sourceUrl\":\"{uploadUrl}\"");
|
||||
sw.WriteLine("}");
|
||||
}
|
||||
}
|
||||
|
||||
return uploadJson;
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult PublishSharedFrameworkCompressedFile(BuildTargetContext c)
|
||||
{
|
||||
var compressedFile = c.BuildContext.Get<string>("SharedFrameworkCompressedFile");
|
||||
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 PublishSharedHostCompressedFile(BuildTargetContext c)
|
||||
{
|
||||
var compressedFile = c.BuildContext.Get<string>("SharedHostCompressedFile");
|
||||
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 PublishCombinedFrameworkSDKHostFile(BuildTargetContext c)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue