aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/osmocom-nightly-packages.sh
blob: a00cad141111c459a4962e47675384f69ebc6e66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/sh

# requirements
# apt install devscripts git-buildpackage osc git

# 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/libasn1c
git clone git://git.osmocom.org/libgtpnl
git clone git://git.osmocom.org/osmo-iuh
git clone git://git.osmocom.org/osmo-sgsn
git clone git://git.osmocom.org/osmo-ggsn
git clone git://git.osmocom.org/openbsc
git clone git://git.osmocom.org/osmo-pcap
git clone git://git.osmocom.org/osmo-trx
git clone git://git.osmocom.org/osmo-bts
git clone git://git.osmocom.org/osmo-pcu
git clone git://git.osmocom.org/osmo-hlr
git clone git://git.osmocom.org/osmo-mgw
git clone git://git.osmocom.org/osmo-msc
git clone git://git.osmocom.org/osmo-bsc


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 libasn1c
build libgtpnl
build osmo-iuh
build osmo-ggsn
build osmo-sgsn
build openbsc
build osmo-pcap
build osmo-trx
build osmo-sip-connector
build osmo-bts
build osmo-pcu
build osmo-hlr
build osmo-mgw
build osmo-msc
build osmo-bsc

cd $PROJ
osc ci -m "Snapshot $DT"