weblate/scripts/set-version
Michal Čihař acf3859fa7 Update year
Signed-off-by: Michal Čihař <michal@cihar.com>
2015-01-05 16:29:18 +01:00

30 lines
639 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'/" 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 ? 2015.
EOT
sed '1D;2D;3D' >> docs/changes.rst < $tmp
rm $tmp
git commit -m "Setting version to $1" weblate/__init__.py docs/conf.py weblate.spec docs/changes.rst setup.py