This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
lynxis lazus gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/4954
osmocom-latest-packages: only publish source tar balls if a new tag was created
OBS should only be updated if there is a new tag.
Change-Id: Ife10c9819e5971b001c5be9d313781eb3fd19e23
---
M scripts/osmocom-latest-packages.sh
1 file changed, 27 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/54/4954/1
diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh
index 23ee3dd..6933baa 100755
--- a/scripts/osmocom-latest-packages.sh
+++ b/scripts/osmocom-latest-packages.sh
@@ -16,21 +16,36 @@
fi
build() {
+ project=$1
+ output=$2
echo
- echo "====> Building $1"
+ echo "====> Building $project"
cd "$TOP"
- rm -rf data
[ -d "$1" ] || git clone "git://git.osmocom.org/$1"
cd "$1"
git fetch
VER=$(git describe --abbrev=0 --tags --match "*.*.*" origin/master)
git checkout -f -B "$VER" "refs/tags/$VER"
- gbp buildpackage -d -S -uc -us "--git-export-dir=$TOP/data" "--git-debian-branch=$VER"
- cd "$TOP/$PROJ/$1"
- osc rm ./* || true
- mv $TOP/data/*.dsc .
- mv $TOP/data/*.tar* .
- osc add ./*
+ gbp buildpackage -d -S -uc -us "--git-export-dir=$output" "--git-debian-branch=$VER"
+
+ if [ ! -d "$TOP/$PROJ/$1" ] ; then
+ # creating a new package is different from using old ones
+ mkdir "$TOP/$PROJ/$1"
+ mv "$output/"*.dsc "$TOP/$PROJ/$1/"
+ cd "$TOP/$PROJ"
+ osc add "$1"
+ else
+ cd "$TOP/$PROJ/$1"
+
+ # update OBS only if the filename doesn't match
+ file=$(cd "$output/" ; ls ./*.dsc)
+ if [ ! -e "$file" ] ; then
+ osc rm ./* || true
+ mv "$output/"*.dsc .
+ mv "$output/"*.tar* .
+ osc add ./*
+ fi
+ fi
cd "$TOP"
}
@@ -56,8 +71,11 @@
osmo-bsc
"
+[ -d "$TOP/debsrc" ] && rm -rf "$TOP/debsrc"
+mkdir "$TOP/debsrc"
+
for p in $PACKAGES; do
- build "$p"
+ build "$p" "$TOP/debsrc/$p"
done
cd "$TOP/$PROJ"
--
To view, visit https://gerrit.osmocom.org/4954
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife10c9819e5971b001c5be9d313781eb3fd19e23
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>