mirror of https://gerrit.osmocom.org/osmo-ci
osmocom-latest-packages: introduce $TOP dir variable
Using a $TOP variable makes directory paths more clear to understandable. Path now expressed starting from the TOP dir instead of using ../../../foo Change-Id: I7a87532a3232fbcfb5f676588991dbc59a34f739
This commit is contained in:
parent
d43eda7abb
commit
3eb2c50d28
|
@ -6,6 +6,7 @@ set -e
|
|||
PROJ=network:osmocom:latest
|
||||
|
||||
DT=`date +%Y%m%d`
|
||||
TOP=$(pwd)
|
||||
|
||||
# start with a checkout of the project
|
||||
if [ -d $PROJ ]; then
|
||||
|
@ -17,19 +18,20 @@ 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=$PWD/../data --git-debian-branch=$VER
|
||||
cd ../$PROJ/$1
|
||||
gbp buildpackage -d -S -uc -us --git-export-dir=$TOP/data --git-debian-branch=$VER
|
||||
cd $TOP/$PROJ/$1
|
||||
osc rm * || true
|
||||
mv ../../data/*.dsc .
|
||||
mv ../../data/*.tar* .
|
||||
mv $TOP/data/*.dsc .
|
||||
mv $TOP/data/*.tar* .
|
||||
osc add *
|
||||
cd ../../
|
||||
cd $TOP
|
||||
}
|
||||
|
||||
PACKAGES="
|
||||
|
@ -58,5 +60,5 @@ for p in $PACKAGES; do
|
|||
build $p
|
||||
done
|
||||
|
||||
cd $PROJ
|
||||
cd $TOP/$PROJ
|
||||
osc ci -m "Latest Tagged versions of $DT"
|
||||
|
|
Loading…
Reference in New Issue