Skip to content

Commit

Permalink
Release: Use test settings for printing version
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Jan 13, 2021
1 parent 39bee79 commit 31d97f6
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions scripts/create-release
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 31d97f6

Please sign in to comment.