summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-10-16 21:35:52 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-10-16 21:35:52 +0200
commit50126d0cc8310597f368bcbe8eccf42caf318c4a (patch)
tree3b51fcc6cbf56f45d7fd0222992c9032995ce7f4
parent60a664cc6af15b9a45f4891cee05fb7d11218bbd (diff)
tag-release: abort on error
-rwxr-xr-xtag-release11
1 files changed, 8 insertions, 3 deletions
diff --git a/tag-release b/tag-release
index 497ce73c..f3a1c6d8 100755
--- a/tag-release
+++ b/tag-release
@@ -5,6 +5,11 @@ if [ -z $1 ]; then
exit
fi
+abort() {
+ echo $1
+ exit 1
+}
+
FULLVERSION=$1
VERSION=${FULLVERSION/-*/}
@@ -18,9 +23,9 @@ sed -i -e "/^ s.version =/ c \ s.version = '$VERSION'" Rakefile
NOGIT=${FULLVERSION/-git/}
if [ $NOGIT == $FULLVERSION ]; then
# Not a git version
- git commit -m "Version $FULLVERSION" -a
- git tag -a -m "rbot $FULLVERSION" rbot-$FULLVERSION
- rake package
+ rake package || abort "Failed to build package!"
+ git commit -m "Version $FULLVERSION" -a || abort "Failed to commit release!"
+ git tag -a -m "rbot $FULLVERSION" rbot-$FULLVERSION || abort "Failed to tag release!"
if [ $VERSION != $FULLVERSION ]; then
pushd pkg
mv rbot-$VERSION.gem rbot-$FULLVERSION.gem