summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-08-08 08:28:26 +0200
committerHarald Welte <laforge@gnumonks.org>2018-08-08 08:29:13 +0200
commitb67c04b3ec36693828863e64727ad22a0b43837b (patch)
treecc83c97ebb0e020789f20c3140bcf83a29140517 /scripts
parentaf5546872182a3024a0764d42be1da79db7accc2 (diff)
osmocom-latest-packages: Fix libusrp and other non-osmocom builds
We're using the build() function not only to build osmocom projects requiring a .tarball-version file, but also other projects such as libusrp. Let's make the related git-buildpackage arguments conditional to whether or not a .tarball-version file exists at all. Change-Id: I0683cff036a240b1b819f91fbd230d5f9211074c
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/osmocom-latest-packages.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh
index 1d122aa..83ab084 100755
--- a/scripts/osmocom-latest-packages.sh
+++ b/scripts/osmocom-latest-packages.sh
@@ -34,10 +34,15 @@ build() {
git fetch
VER=$(git tag -l --sort=v:refname | grep "^[0-9]*.[0-9]*.[0-9]*$" | tail -n 1)
git checkout -f -B "$VER" "refs/tags/$VER"
- test -x ./git-version-gen && ./git-version-gen . > .tarball-version 2>/dev/null
- gbp buildpackage -d -S -uc -us "--git-export-dir=$output" "--git-debian-branch=$VER" \
- --git-ignore-new \
- --git-postexport='cp $GBP_GIT_DIR/../.tarball-version $GBP_TMP_DIR/'
+ if [ -x ./git-version-gen ]; then
+ ./git-version-gen . > .tarball-version 2>/dev/null
+ gbp buildpackage -S -uc -us -d --git-ignore-branch "--git-export-dir=$output" \
+ "--git-debian-branch=$VER" --git-ignore-new \
+ --git-postexport='cp $GBP_GIT_DIR/../.tarball-version $GBP_TMP_DIR/'
+ else
+ gbp buildpackage -S -uc -us -d --git-ignore-branch "--git-export-dir=$output" \
+ "--git-debian-branch=$VER" --git-ignore-new
+ fi
if [ ! -d "$TOP/$PROJ/$1" ] ; then
# creating a new package is different from using old ones