mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-05-05 11:21:53 +08:00
18 lines
706 B
Bash
Executable file
18 lines
706 B
Bash
Executable file
#!/bin/sh
|
|
set -e
|
|
|
|
if ! git diff --exit-code --quiet ; then
|
|
echo "There are not committed changes!"
|
|
exit 1
|
|
fi
|
|
|
|
export CI_DATABASE=postgresql
|
|
version=$(DJANGO_SETTINGS_MODULE=weblate.settings_test python -c 'import weblate; print(weblate.VERSION_BASE)')
|
|
today=$(DJANGO_SETTINGS_MODULE=weblate.settings_test ./manage.py shell -c 'from django.utils.dateformat import format; import datetime; print(format(datetime.date.today(), "F dS Y"))')
|
|
|
|
sed -i "s/^VERSION =.*/VERSION = \"$version\"/" weblate/__init__.py
|
|
sed -i "s/^Not yet released./Released on $today./" docs/changes.rst
|
|
|
|
if ! git diff --exit-code --quiet ; then
|
|
git commit -m "Releasing $version" -- weblate/__init__.py docs/changes.rst
|
|
fi
|