midori/tools/release

58 lines
2.5 KiB
Text
Raw Permalink Normal View History

2015-09-12 00:47:06 +00:00
#! /bin/bash
2013-10-24 03:45:02 +00:00
2015-09-12 00:47:06 +00:00
# Copyright (C) 2013-2014 Christian Dywan <christian@twotoasts.de>
2013-10-24 03:45:02 +00:00
#
# 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.
2015-09-12 00:47:06 +00:00
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))")
2013-10-24 03:45:02 +00:00
if [ "x$1" = "xbefore" ]; then
echo Bumping from $OLDVER to $NEWVER
2015-09-12 00:47:06 +00:00
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
2013-10-24 03:45:02 +00:00
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' | \
2015-09-12 00:47:06 +00:00
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'"
2013-10-24 03:45:02 +00:00
case $SHELL in
*fish*)
echo -n '; and ' ;;
*)
echo -n ' && ' ;;
esac
2015-09-12 00:47:06 +00:00
echo bzr tag $NEWVER
elif [ "x$1" = "xafter" ]; then
2013-10-24 03:45:02 +00:00
echo Press RETURN to download tarball now; read yes
2015-09-12 00:47:06 +00:00
wget http://bazaar.launchpad.net/~midori/midori/trunk/tarball
2013-10-24 03:45:02 +00:00
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
2015-09-12 00:47:06 +00:00
echo 'Usage: ['$(basename $0)']' 'before|after' [NEW VERSION]
2013-10-24 03:45:02 +00:00
exit 1
fi