Debian package and publish changes

- Use parameters instead of env vars to create debian packages.
- Target to publish the deb package to the debian repo.
This commit is contained in:
Sridhar Periyasamy 2016-03-08 23:33:18 +00:00
parent ae041c8f61
commit 015bda2137
6 changed files with 134 additions and 276 deletions

View file

@ -40,9 +40,14 @@ namespace Microsoft.DotNet.Cli.Build
[BuildPlatforms(BuildPlatform.Ubuntu)]
public static BuildTargetResult GenerateDeb(BuildTargetContext c)
{
var env = PackageTargets.GetCommonEnvVars(c);
Cmd(Path.Combine(Dirs.RepoRoot, "scripts", "package", "package-debian.sh"))
.Environment(env)
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");
Cmd(Path.Combine(Dirs.RepoRoot, "scripts", "package", "package-debian.sh"),
"-v", version, "-i", Dirs.Stage2, "-o", debFile, "-p", packageName, "-m", manPagesDir, "-c", channel)
.Execute()
.EnsureSuccessful();
return c.Success();