Skip to content

Commit

Permalink
[Packaging] Separate builds for trusty/xenial
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lukeyeager committed Oct 28, 2016
1 parent 4b799ea commit 2d3eb8c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packaging/deb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]"

ARG UPSTREAM_VERSION
Expand Down
37 changes: 36 additions & 1 deletion scripts/travis/deb-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2d3eb8c

Please sign in to comment.