Commit aa6772a3 authored by Romain Bignon's avatar Romain Bignon
Browse files

script to release weboob

parent 2a81e8d9
# This script is used to release a version.
function set_version {
echo -n "Replacing version in source files"
for fl in $(find . -iname "*.py"); do
sed "s/\(VERSION\|version\|release\) *= *[\"'][0-9]\+\..\+[\"']/\1 = '$1'/g" $fl > $
diff $ $fl >/dev/null && echo -n "." || echo -n "+"
cp -f $ $fl
rm -f $
echo -e " done.\n"
if [ "$1" = "" ]; then
echo "Syntax: $0 VERSION"
exit 1
mv ChangeLog ChangeLog.old
echo -e "Weboob $VERSION (`date +%Y-%m-%d`)\n\t \n\n" > ChangeLog
cat ChangeLog.old >> ChangeLog
rm -f ChangeLog.old
vi +2 ChangeLog
set_version $VERSION
echo "Release commit:"
git commit -a -m "Weboob $VERSION released"
echo -ne "\n"
echo "Release tag:"
git tag $VERSION -s -m "Weboob $VERSION"
echo -ne "\n"
echo -n "Generating archive.. "
git archive HEAD --prefix=weboob-$VERSION/ -o weboob-$VERSION.tar
gzip -f weboob-$VERSION.tar
md5sum weboob-$VERSION.tar.gz
echo -ne "\nDo you want to change the version number (y/n) "
read change_version
if [ "$change_version" = "y" ]; then
echo -n "Enter the new version number: "
set_version $NEW_VERSION
git commit -a -m "bump to $NEW_VERSION"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment