From b67c04b3ec36693828863e64727ad22a0b43837b Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 8 Aug 2018 08:28:26 +0200 Subject: [PATCH] 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 --- scripts/osmocom-latest-packages.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 1d122aab..83ab0842 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