X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=tag-release;h=a1e916ff875d7928b20c1c3038fe097b2dbfd95b;hb=63314f4987d7acc8a39a3680320e339cc94da66b;hp=497ce73cf5ae2eda117b69adcd8e57d3de71722c;hpb=3e3ae3b4ce4d35d2796d2e73206da31f8bde1655;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/tag-release b/tag-release index 497ce73c..a1e916ff 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/-*/} @@ -13,14 +18,15 @@ echo "Version: $VERSION" sed -i -e "/^\$version =/ c \$version = '$FULLVERSION'" launch_here.rb sed -i -e "/^\$version ||=/ c \$version ||= '$FULLVERSION'" bin/rbot -sed -i -e "/^ s.version =/ c \ s.version = '$VERSION'" Rakefile +sed -i -e "/^ s.version =/ c \ s.version = '$VERSION'" rbot.gemspec +sed -i -e "/^ " man/*.xml 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