aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/osmocom-latest-packages.sh
blob: 23ee3dd87a37d3f7ab2b43db27870f15e95276f5 (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
#!/bin/sh

set -e

# OBS project name
PROJ=network:osmocom:latest

DT=$(date +%Y%m%d)
TOP=$(pwd)

# 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"
  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 ./*
  cd "$TOP"
}

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

cd "$TOP/$PROJ"
osc ci -m "Latest Tagged versions of $DT"