From 50126d0cc8310597f368bcbe8eccf42caf318c4a Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 16 Oct 2008 21:35:52 +0200 Subject: tag-release: abort on error --- tag-release | 11 ++++++++--- 1 file 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 -- cgit v1.2.3