weblate/scripts/set-version
Michal Čihař c308f5c067 Next release will be in 2016
[CI skip]

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-03-04 15:48:46 +01:00

30 lines
646 B
Bash
Executable file

#!/bin/sh
set -e
if [ -z "$1" ] ; then
echo 'Usage: ./scripts/set-version VERSION'
exit 1
fi
sed -i "s/^VERSION =.*/VERSION = '$1-dev'/" weblate/__init__.py
sed -i "s/version =.*/version = '$1'/" docs/conf.py
sed -i "s/Version: .*/Version: $1/" weblate.spec
sed -i "s/version=.*,/version='$1',/" setup.py
# Update docs/changes.rst
tmp=`mktemp`
cp docs/changes.rst $tmp
cat > docs/changes.rst <<EOT
Changes
=======
weblate $1
-----------
Released on ? 2016.
EOT
sed '1D;2D;3D' >> docs/changes.rst < $tmp
rm $tmp
git commit -s -m "Setting version to $1" weblate/__init__.py docs/conf.py weblate.spec docs/changes.rst setup.py