From 2d3eb8ce15ed31a610ce121ba7d438fc60abfd58 Mon Sep 17 00:00:00 2001 From: Luke Yeager Date: Fri, 28 Oct 2016 13:30:46 -0700 Subject: [PATCH] [Packaging] Separate builds for trusty/xenial Besides the version, the two generated debs will be identical. But Launchpad won't let me upload the exact same file to the same PPA twice (once for trusty and once for xenial). So, I have to give them a different name and build twice. --- packaging/deb/Dockerfile | 2 +- scripts/travis/deb-build.sh | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/packaging/deb/Dockerfile b/packaging/deb/Dockerfile index 0e0e7e7b7..6b5e155ad 100644 --- a/packaging/deb/Dockerfile +++ b/packaging/deb/Dockerfile @@ -9,7 +9,7 @@ RUN apt-get update \ lintian \ && rm -rf /var/lib/apt/lists/* -ENV DEBFULLNAME "NVIDIA CORPORATION" +ENV DEBFULLNAME "DIGITS Development Team" ENV DEBEMAIL "digits@nvidia.com" ARG UPSTREAM_VERSION diff --git a/scripts/travis/deb-build.sh b/scripts/travis/deb-build.sh index 007bf3832..b38814426 100755 --- a/scripts/travis/deb-build.sh +++ b/scripts/travis/deb-build.sh @@ -8,5 +8,40 @@ ROOT_DIR=$( dirname "$(dirname "$LOCAL_DIR")") set -x git fetch --tags -$ROOT_DIR/packaging/deb/build.sh +cd $ROOT_DIR/packaging/deb +DEBIAN_REVISION=1ppa1~trusty ./build.sh +DEBIAN_REVISION=1ppa1~xenial ./build.sh + +if [ "$TRAVIS" != "true" ]; then + echo "Skipping PPA uploads for non-Travis build." + exit 0 +fi +if [ "$TRAVIS_REPO_SLUG" != "NVIDIA/DIGITS" ]; then + echo "Skipping PPA uploads for non-DIGITS fork build." + exit 0 +fi +if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + echo "Skipping PPA uploads for pull request build." + exit 0 +fi +if [ -n "$TRAVIS_TAG" ]; then + PPA_NAME=stable +elif [ "$TRAVIS_BRANCH" == "master" ]; then + PPA_NAME=dev +else + echo "Skipping PPA uploads for non-master branch build" + exit 0 +fi + +echo "Uploading to \"$PPA_NAME\" PPA ..." + +pushd . +cd dist/*trusty +find . +popd + +pushd . +cd dist/*xenial +find . +popd