Use explicit object directory for sdk deb pacakge

As we add more deb packages, we should keep everything tidy by given
each one it's on individual object root.
This commit is contained in:
Matt Ellis 2016-03-10 00:21:09 -08:00
parent 7e7995274a
commit 5cf35e4f38
2 changed files with 18 additions and 4 deletions

View file

@ -77,8 +77,17 @@ namespace Microsoft.DotNet.Cli.Build
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 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", Dirs.Stage2, "-o", debFile, "-p", packageName, "-m", manPagesDir, "--previous-version-url", previousVersionURL)
"-v", version, "-i", Dirs.Stage2, "-o", debFile, "-p", packageName, "-m", manPagesDir, "--previous-version-url", previousVersionURL, "--obj-root", objRoot)
.Execute()
.EnsureSuccessful();
return c.Success();

View file

@ -29,6 +29,7 @@ help(){
echo " --output <output debfile> The full path to which the package will be written."
echo " --package-name <package name> Package to identify during installation. Example - 'dotnet-nightly', 'dotnet'"
echo " --previous-version-url <url> Url to the previous version of the debian packge against which to run the upgrade tests."
echo " --obj-root <object root> Root folder for intermediate objects."
exit 1
}
@ -61,6 +62,10 @@ parseargs(){
PREVIOUS_VERSION_URL=$2
shift
;;
--obj-root)
OBJECT_DIR=$2
shift
;;
--help)
help
;;
@ -103,9 +108,9 @@ parseargs $@
PACKAGING_ROOT="$REPOROOT/packaging/debian"
PACKAGING_TOOL_DIR="$REPOROOT/tools/DebianPackageTool"
PACKAGE_OUTPUT_DIR=$(dirname "${OUTPUT_DEBIAN_FILE}")
PACKAGE_LAYOUT_DIR="$PACKAGE_OUTPUT_DIR/deb_intermediate"
TEST_STAGE_DIR="$PACKAGE_OUTPUT_DIR/debian_tests"
PACKAGE_OUTPUT_DIR="$OBJECT_DIR/deb_output"
PACKAGE_LAYOUT_DIR="$OBJECT_DIR/deb_intermediate"
TEST_STAGE_DIR="$OBJECT_DIR/debian_tests"
# remove any residual deb files from earlier builds
rm -f "$PACKAGE_OUTPUT_DIR/*.deb"