2017-10-28 21:22:43 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2017-11-21 12:06:14 +00:00
|
|
|
set -e
|
2017-10-28 21:22:43 +00:00
|
|
|
|
|
|
|
# OBS project name
|
|
|
|
PROJ=network:osmocom:latest
|
|
|
|
|
|
|
|
DT=`date +%Y%m%d`
|
2017-11-15 19:42:39 +00:00
|
|
|
TOP=$(pwd)
|
2017-10-28 21:22:43 +00:00
|
|
|
|
|
|
|
# start with a checkout of the project
|
|
|
|
if [ -d $PROJ ]; then
|
|
|
|
(cd $PROJ && osc up)
|
|
|
|
else
|
|
|
|
osc co $PROJ
|
|
|
|
fi
|
|
|
|
|
|
|
|
build() {
|
|
|
|
echo
|
|
|
|
echo "====> Building $1"
|
2017-11-15 19:42:39 +00:00
|
|
|
cd $TOP
|
2017-10-28 21:22:43 +00:00
|
|
|
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
|
2017-11-15 19:42:39 +00:00
|
|
|
gbp buildpackage -d -S -uc -us --git-export-dir=$TOP/data --git-debian-branch=$VER
|
|
|
|
cd $TOP/$PROJ/$1
|
2017-10-28 21:22:43 +00:00
|
|
|
osc rm * || true
|
2017-11-15 19:42:39 +00:00
|
|
|
mv $TOP/data/*.dsc .
|
|
|
|
mv $TOP/data/*.tar* .
|
2017-10-28 21:22:43 +00:00
|
|
|
osc add *
|
2017-11-15 19:42:39 +00:00
|
|
|
cd $TOP
|
2017-10-28 21:22:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
PACKAGES="
|
|
|
|
libosmocore
|
|
|
|
libosmo-sccp
|
|
|
|
libosmo-abis
|
|
|
|
libosmo-netif
|
|
|
|
libsmpp34
|
|
|
|
libasn1c
|
|
|
|
osmo-iuh
|
|
|
|
osmo-ggsn
|
|
|
|
osmo-sgsn
|
|
|
|
openbsc
|
|
|
|
osmo-pcap
|
|
|
|
osmo-trx
|
|
|
|
osmo-sip-connector
|
|
|
|
osmo-bts
|
|
|
|
osmo-pcu
|
|
|
|
osmo-hlr
|
|
|
|
osmo-mgw
|
|
|
|
osmo-msc
|
|
|
|
osmo-bsc
|
|
|
|
"
|
|
|
|
|
|
|
|
for p in $PACKAGES; do
|
|
|
|
build $p
|
|
|
|
done
|
|
|
|
|
2017-11-15 19:42:39 +00:00
|
|
|
cd $TOP/$PROJ
|
2017-10-28 21:22:43 +00:00
|
|
|
osc ci -m "Latest Tagged versions of $DT"
|