summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-23 14:13:22 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-23 16:51:58 -0800
commit31a6f3c383ea46e995e1a9676a655d125188ad17 (patch)
treedf46b48f28d3b386dbb7db2e425617fa219848f2 /packaging
parent4a8e1485e179ad9437749987a2407e27c9a078b4 (diff)
downloadsubsurface-31a6f3c383ea46e995e1a9676a655d125188ad17.tar.gz
Handle building beta packages
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging')
-rw-r--r--packaging/ubuntu/make-package.sh42
1 files changed, 32 insertions, 10 deletions
diff --git a/packaging/ubuntu/make-package.sh b/packaging/ubuntu/make-package.sh
index a20971150..6063e1b50 100644
--- a/packaging/ubuntu/make-package.sh
+++ b/packaging/ubuntu/make-package.sh
@@ -20,10 +20,15 @@ if [[ -d subsurface_$VERSION ]]; then
mv subsurface_$VERSION.bak subsurface_$VERSION.bak.prev
mv subsurface_$VERSION subsurface_$VERSION.bak
fi
-rm -f subsurfacedaily-$VERSION
-
mkdir subsurface_$VERSION
-ln -s subsurface_$VERSION subsurfacedaily-$VERSION
+if [[ "x$GITREVISION" != "x" ]] ; then
+ rm -f subsurfacedaily-$VERSION
+ ln -s subsurface_$VERSION subsurfacedaily-$VERSION
+else
+ rm -f subsurfacebeta-$VERSION
+ ln -s subsurface_$VERSION subsurfacebeta-$VERSION
+fi
+
#
#
echo "copying sources"
@@ -39,7 +44,11 @@ echo $LIBDCREVISION > libdivecomputer/revision
#
echo "creating source tar file for OBS and Ununtu PPA"
#
-(cd .. ; tar ch subsurfacedaily-$VERSION | xz > home:Subsurface-Divelog/Subsurface-daily/subsurface-$VERSION.orig.tar.xz) &
+if [[ "x$GITREVISION" != "x" ]] ; then
+ (cd .. ; tar ch subsurfacedaily-$VERSION | xz > home:Subsurface-Divelog/Subsurface-daily/subsurface-$VERSION.orig.tar.xz) &
+else
+ (cd .. ; tar ch subsurfacebeta-$VERSION | xz > home:Subsurface-Divelog/Subsurface-beta/subsurface-$VERSION.orig.tar.xz) &
+fi
tar cf - . | xz > ../subsurface_$VERSION.orig.tar.xz
#
#
@@ -87,10 +96,23 @@ debuild -S
cd ..
if [[ "$1x" = "postx" ]] ; then
- dput ppa:subsurface/subsurface-daily subsurface_$VERSION-$rev~*.changes
- cd home:Subsurface-Divelog/Subsurface-daily
- osc rm $(ls subsurface*.tar.xz | grep -v $VERSION)
- osc add subsurface-$VERSION.orig.tar.xz
- sed -i "s/%define gitVersion .*/%define gitVersion $GITREVISION/" subsurfacedaily.spec
- osc commit -m "next daily build"
+ # daily vs. beta vs. release
+ if [[ "x$GITREVISION" == "x" ]] ; then
+ # this is a beta or a release; assume beta for now and deal with release later :-)
+ dput ppa:subsurface/subsurface-beta subsurface_$VERSION-$rev~*.changes
+ cd home:Subsurface-Divelog/Subsurface-beta
+ osc rm $(ls subsurface*.tar.xz | grep -v $VERSION)
+ osc add subsurface-$VERSION.orig.tar.xz
+ sed -i "s/%define latestVersion.*/%define latestVersion $VERSION/" subsurfacebeta.spec
+ sed -i "s/%define gitVersion .*/%define gitVersion 0/" subsurfacebeta.spec
+ osc commit -m "next beta build"
+ else
+ dput ppa:subsurface/subsurface-daily subsurface_$VERSION-$rev~*.changes
+ cd home:Subsurface-Divelog/Subsurface-daily
+ osc rm $(ls subsurface*.tar.xz | grep -v $VERSION)
+ osc add subsurface-$VERSION.orig.tar.xz
+ sed -i "s/%define latestVersion.*/%define latestVersion $VERSION/" subsurfacedaily.spec
+ sed -i "s/%define gitVersion .*/%define gitVersion $GITREVISION/" subsurfacedaily.spec
+ osc commit -m "next daily build"
+ fi
fi