public static BuildTargetResult PublishDebFileToDebianRepo(BuildTargetContext c) { var packageName = Monikers.GetDebianPackageName(c); var installerFile = c.BuildContext.Get <string>("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) .Execute() .EnsureSuccessful(); return(c.Success()); }
public static BuildTargetResult GenerateDeb(BuildTargetContext c) { 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>("InstallerFile"); 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"; 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) .Execute() .EnsureSuccessful(); return(c.Success()); }