diff --git a/scripts/create-release b/scripts/create-release index 8fa5a3096574..3fe96659593b 100755 --- a/scripts/create-release +++ b/scripts/create-release @@ -12,13 +12,20 @@ if ! git diff --exit-code --quiet ; then exit 1 fi +DO_TAG=0 +if [ "x$1" = "x--tag" ] ; then + DO_TAG=1 + shift +fi + # Grab version -version=`DJANGO_SETTINGS_MODULE=weblate.settings_example python -c 'import weblate; print(weblate.VERSION_BASE)'` +. scripts/test-database +version=`python -c 'import weblate; print(weblate.VERSION_BASE)'` namever=weblate-$version tarver=Weblate-$version # What are we going to build? -if [ "x$1" = "x--tag" ] ; then +if [ "$DO_TAG" -eq 1 ] ; then ./scripts/prepare-release git tag -s $namever -m "Version $version" cd ~/weblate/test @@ -40,7 +47,7 @@ zcat dist/$tarver.tar.gz | xz > dist/$tarver.tar.xz zcat dist/$tarver.tar.gz | bzip2 > dist/$tarver.tar.bz2 # Upload release -if [ "x$1" = "x--tag" ] ; then +if [ "$DO_TAG" -eq 1 ] ; then # PyPi archive upload twine upload --sign --identity 63CB1DF1EF12CF2AC0EE5A329C27B31342B7511D dist/$tarver.tar.gz twine upload --sign --identity 63CB1DF1EF12CF2AC0EE5A329C27B31342B7511D dist/$tarver*.whl