aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-03-14 15:11:54 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2017-03-14 15:12:52 +0100
commitdccc24b9b3e78bb766b0d26bee8e64a6da8f17b8 (patch)
tree028bb9819e91b8943a7f0fd540eb221ad8727d2b /scripts
parent7a83d9780702a32e88469a7cf268a2c517174ba7 (diff)
add script to submit nightly packages
Move the script here from http://jenkins.osmocom.org/jenkins/job/Osmocom_nightly_packages/ The jenkins job shall call this script instead. One change: instead of 'rm -rf *', rather check for an empty dir, to not endanger valuable data a user may have around when invoking this script out of curiosity.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/osmocom-nightly-packages.sh70
1 files changed, 70 insertions, 0 deletions
diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh
new file mode 100644
index 0000000..8c81831
--- /dev/null
+++ b/scripts/osmocom-nightly-packages.sh
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+# rather than including a dangerous 'rm -rf *' here, lets delegate to the user:
+if [ -n "$(ls)" ]; then
+ echo "ERROR: I need to run in an empty directory."
+ exit 1
+fi
+
+set -x -e
+
+git clone git://git.osmocom.org/osmo-sip-connector
+git clone git://git.osmocom.org/libosmocore
+git clone git://git.osmocom.org/libosmo-sccp
+git clone git://git.osmocom.org/libosmo-abis
+git clone git://git.osmocom.org/libosmo-netif
+git clone git://git.osmocom.org/libsmpp34
+git clone git://git.osmocom.org/openggsn
+git clone git://git.osmocom.org/openbsc
+git clone git://git.osmocom.org/osmo-pcap
+git clone git://git.osmocom.org/cellmgr-ng osmo-stp
+git clone git://git.osmocom.org/osmo-trx
+git clone git://git.osmocom.org/osmo-bts
+git clone git://git.osmocom.org/osmo-pcu
+
+
+PROJ=network:osmocom:nightly
+osc co $PROJ
+
+DT=`date +%Y%m%d`
+
+
+build() {
+ rm -rf data
+ cd $1
+ VER=`head -1 debian/changelog | cut -d ' ' -f 2 | sed s,"(","", | sed s,")","",`
+ dch -v $VER.$DT -m "Snapshot build"
+ git commit -m "$DT snapshot" debian/
+ gbp buildpackage -S -uc -us --git-export-dir=$PWD/../data
+ cd ../$PROJ/$1
+ osc rm * || true
+ mv ../../data/*.dsc .
+ mv ../../data/*.tar* .
+ osc add *
+ cd ../../
+}
+
+build libosmocore
+build libosmo-sccp
+build libosmo-abis
+build libosmo-netif
+build libsmpp34
+build openggsn
+build openbsc
+build osmo-pcap
+build osmo-stp
+build osmo-trx
+build osmo-sip-connector
+
+cp openbsc/openbsc/include/openbsc/gsm_data_shared.h osmo-bts/include/openbsc/
+cp openbsc/openbsc/src/libcommon/gsm_data_shared.c osmo-bts/src/common/gsm_data_shared.c
+cd osmo-bts
+git add include/openbsc/gsm_data_shared.h
+git add src/common/gsm_data_shared.c
+git commit -m "Copy OpenBSC files needed for the build"
+cd ../
+build osmo-bts
+build osmo-pcu
+
+cd $PROJ
+osc ci -m "Snapshot $DT"