mirror of https://gerrit.osmocom.org/osmo-ci
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
This commit is contained in:
parent
af55468721
commit
b67c04b3ec
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue