57 lines
2.5 KiB
Bash
Executable file
57 lines
2.5 KiB
Bash
Executable file
#! /bin/bash
|
|
|
|
# Copyright (C) 2013-2014 Christian Dywan <christian@twotoasts.de>
|
|
#
|
|
# This library is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
# License as published by the Free Software Foundation; either
|
|
# version 2.1 of the License, or (at your option) any later version.
|
|
#
|
|
# See the file COPYING for the full license text.
|
|
|
|
OLDVER=$(grep -r --color=no '^set(VERSION' CMakeLists.txt | sed -r "s@.+ ([0-9.]+)\)@\1@")
|
|
NEWVER="$2"
|
|
test -z "$NEWVER" && NEWVER=$(python -c "print('0.'+str(float('$OLDVER'[2:])+.1))")
|
|
if [ "x$1" = "xbefore" ]; then
|
|
echo Bumping from $OLDVER to $NEWVER
|
|
sed -i "s@$OLDVER@$NEWVER@g" CMakeLists.txt win32/makedist/midori.nsi
|
|
mv ChangeLog ChangeLog.old || exit 1
|
|
echo This file is licensed under the terms of the expat license, see the file EXPAT. > ChangeLog
|
|
echo >> ChangeLog
|
|
echo v$NEWVER >> ChangeLog
|
|
bzr log --line -rtag:$OLDVER.. \
|
|
| sed -r 's@.+20[0-9][0-9]-[0-9]+-[0-9]+ @ @' \
|
|
| sed 's@\[merge\] @@' \
|
|
| grep -v -E 'l10n|Revert |makedist|tools(/release)?: |nsi|translation|Bump version to|Merge lp:midori|POTFILES.in' \
|
|
>> ChangeLog
|
|
tail -n+2 ChangeLog.old >> ChangeLog
|
|
rm ChangeLog.old
|
|
curl http://wiki.xfce.org/_export/raw/midori/contribute | \
|
|
sed -r 's@\[\[([^|]+)\|([^]]+)\]\]@\1 \2@g' | \
|
|
sed -r 's@<code( bash|)>|</code>@@g' > HACKING.new
|
|
test -s HACKING.new && mv HACKING{.new,} || rm HACKING.new
|
|
curl http://wiki.xfce.org/_export/xhtml/midori/faq | \
|
|
sed 's@This is a list of frequently asked questions@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.new
|
|
test -s data/faq.html.new && mv data/faq.html{.new,} || rm data/faq.html.new
|
|
echo -n bzr commit -p -m "'Bump version to $NEWVER'"
|
|
case $SHELL in
|
|
*fish*)
|
|
echo -n '; and ' ;;
|
|
*)
|
|
echo -n ' && ' ;;
|
|
esac
|
|
echo bzr tag $NEWVER
|
|
elif [ "x$1" = "xafter" ]; then
|
|
echo Press RETURN to download tarball now; read yes
|
|
wget http://bazaar.launchpad.net/~midori/midori/trunk/tarball
|
|
echo Press RETURN to update Launchpad bugs now; read yes
|
|
if [ -n $(which bugreleaser 1>/dev/null) ]; then
|
|
bugreleaser midori
|
|
else
|
|
echo bzr branch lp:~mgiuca/+junk/launchpad-tools
|
|
fi
|
|
else
|
|
echo 'Usage: ['$(basename $0)']' 'before|after' [NEW VERSION]
|
|
exit 1
|
|
fi
|