public static BuildTargetResult GenerateSdkDeb(BuildTargetContext c) { var channel = c.BuildContext.Get <string>("Channel").ToLower(); var packageName = Monikers.GetSdkDebianPackageName(c); var version = c.BuildContext.Get <BuildVersion>("BuildVersion").NuGetVersion; var debFile = c.BuildContext.Get <string>("SdkInstallerFile"); 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"; var sdkPublishRoot = c.BuildContext.Get <string>("CLISDKRoot"); var sharedFxDebianPackageName = Monikers.GetDebianSharedFrameworkPackageName(c); var objRoot = Path.Combine(Dirs.Output, "obj", "debian", "sdk"); if (Directory.Exists(objRoot)) { Directory.Delete(objRoot, true); } Directory.CreateDirectory(objRoot); Cmd(Path.Combine(Dirs.RepoRoot, "scripts", "package", "package-debian.sh"), "-v", version, "-i", sdkPublishRoot, "-o", debFile, "-p", packageName, "-m", manPagesDir, "--framework-debian-package-name", sharedFxDebianPackageName, "--framework-nuget-name", Monikers.SharedFrameworkName, "--framework-nuget-version", c.BuildContext.Get <string>("SharedFrameworkNugetVersion"), "--previous-version-url", previousVersionURL, "--obj-root", objRoot) .Execute() .EnsureSuccessful(); return(c.Success()); }
public static BuildTargetResult PublishSdkDebToDebianRepo(BuildTargetContext c) { var version = CliNuGetVersion; var packageName = Monikers.GetSdkDebianPackageName(c); var installerFile = c.BuildContext.Get <string>("SdkInstallerFile"); var uploadUrl = AzurePublisherTool.CalculateInstallerUploadUrl(installerFile, Channel, version); DebRepoPublisherTool.PublishDebFileToDebianRepo( packageName, version, uploadUrl); return(c.Success()); }
public static BuildTargetResult RemovePackages(BuildTargetContext c) { IEnumerable <string> orderedPackageNames = new List <string>() { Monikers.GetSdkDebianPackageName(c), Monikers.GetDebianSharedFrameworkPackageName(c), Monikers.GetDebianSharedHostPackageName(c) }; foreach (var packageName in orderedPackageNames) { RemovePackage(packageName); } return(c.Success()); }