[Xfce4-commits] <midori:master> tools/release: Print shell-dependant fail-safe git command

Christian Dywan noreply at xfce.org
Fri May 17 20:38:04 CEST 2013


Updating branch refs/heads/master
         to 5fd74d20aef298800055d37c4d455759d579bc81 (commit)
       from 41f052da87f31e2a0da0161d6da5010bc18ac8a3 (commit)

commit 5fd74d20aef298800055d37c4d455759d579bc81
Author: Christian Dywan <christian at twotoasts.de>
Date:   Fri May 17 20:35:28 2013 +0200

    tools/release: Print shell-dependant fail-safe git command

 tools/release |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/tools/release b/tools/release
index dbf4cf9..ce10bb7 100755
--- a/tools/release
+++ b/tools/release
@@ -9,17 +9,24 @@
 #
 # See the file COPYING for the full license text.
 
+OLDVER=$(git describe --abbrev=0)
+NEWVER=$(python -c "print('0.'+str(float('$OLDVER'[2:])+.1))")
 if [ "x$1" = "xbefore" ]; then
-    OLDVER=$(git describe --abbrev=0)
-    NEWVER=$(python -c "print('0.'+str(float('$OLDVER'[2:])+.1))")
     echo Bumping from $OLDVER to $NEWVER
     sed -i "s@$OLDVER@$NEWVER at g" wscript win32/makedist/midori.nsi
-    echo; git log --pretty='format: %s' $OLDVER..HEAD | grep -v l10n | grep -v makedist | grep -v tools/release | grep -v nsi | grep -v -E 'Update .+ translation'; echo
+    echo; echo v$NEWVER:; git log --pretty='format: %s' $OLDVER..HEAD | grep -v l10n | grep -v makedist | grep -v tools/release | grep -v nsi | grep -v -E 'Update .+ translation'; echo
     curl http://wiki.xfce.org/_export/xhtml/midori/faq | \
         sed 's at This is a list of frequently asked questions at This is <a href="http://wiki.xfce.org/midori/faq">a snapshot of the online FAQ</a>@g' | \
         sed 's@<link rel="style.*>@<link rel="stylesheet" href="faq.css" />@g' > data/faq.html
 elif [ "x$1" = "xafter" ]; then
-    echo git commit -m "'Bump version to $NEWVER'"';' git tag -a $NEWVER -m "'Bump version to $NEWVER'"
+    echo -n git commit -m "'Bump version to $NEWVER'"
+    case $SHELL in
+    *fish*)
+        echo -n '; and ' ;;
+    *)
+        echo -n ' && ' ;;
+    esac
+    echo git tag -a $NEWVER -m "'Bump version to $NEWVER'"
     echo http://git.xfce.org/apps/midori/snapshot/midori-$NEWVER.tar.bz2
     echo https://releases.xfce.org/
     echo Press RETURN to update Launchpad bugs now; read yes


More information about the Xfce4-commits mailing list