From f59d6dfc9aa02e39ae15f6bd37ba9b02e4e6007b Mon Sep 17 00:00:00 2001 From: Gary Lowell Date: Mon, 12 Aug 2013 15:22:48 -0700 Subject: [PATCH] build scripts: Update for release builds. Allow alternate signing keyid to be specified in environment variable. For debian add backport tags to release version numbers if release flag is set. Signed-off-by: Gary Lowell --- scripts/build-debian.sh | 20 +++++++++++++++++++- scripts/build-rpm.sh | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/scripts/build-debian.sh b/scripts/build-debian.sh index 4e477f9..0ae1f51 100755 --- a/scripts/build-debian.sh +++ b/scripts/build-debian.sh @@ -5,9 +5,15 @@ REPO=debian-repo COMPONENT=main -KEYID=03C3951A # Autobuild keyid +KEYID=${KEYID:-03C3951A} # default is autobuild keyid DEB_DIST="sid wheezy squeeze quantal precise oneiric natty raring" DEB_BUILD=$(lsb_release -s -c) +RELEASE=0 + +if [ X"$1" = X"--release" ] ; then + echo "Release Build" + RELEASE=1 +fi if [ ! -d debian ] ; then echo "Are we in the right directory" @@ -22,6 +28,18 @@ else exit 3 fi +# Clean up any leftover builds +rm -f ../ceph-deploy*.dsc ../ceph-deploy*.changes ../ceph-deploy*.deb ../ceph-deploy.tgz +rm -rf ./debian-repo + +# Apply backport tag if release build +if [ $RELEASE -eq 1 ] ; then + DEB_VERSION=$(dpkg-parsechangelog | sed -rne 's,^Version: (.*),\1, p') + BP_VERSION=${DEB_VERSION}${BPTAG} + DEBEMAIL="gary.lowell@inktank.com" dch -D $DIST --force-distribution -b -v "$BP_VERSION" "$comment" + dpkd-source -b . +fi + # Build Package echo "Building for dist: $DEB_BUILD" dpkg-buildpackage -k$KEYID diff --git a/scripts/build-rpm.sh b/scripts/build-rpm.sh index 3f3abc5..9b330e4 100755 --- a/scripts/build-rpm.sh +++ b/scripts/build-rpm.sh @@ -4,7 +4,7 @@ # in setup.py before building. REPO=rpm-repo -KEYID=03C3951A # Autobuild keyid +KEYID=${KEYID:-03C3951A} # Default is autobuild-key BUILDAREA=./rpmbuild DIST=el6 RPM_BUILD=$(lsb_release -s -c) -- 2.47.3