Support for defining version to use

This commit is contained in:
Michal Čihař 2021-10-27 12:10:16 +02:00
parent 40a613abfe
commit c3fb75bd53
3 changed files with 4 additions and 2 deletions

View file

@ -33,6 +33,7 @@ WEBLATE_TITLE="$title"
WEBLATE_SECRET=$(openssl rand -hex 32)
WEBLATE_SENTRY="$sentry"
WEBLATE_SENTRY_TOKEN="$sentry_token"
WEBLATE_VERSION=""

# Matomo
MATOMO_SITE="$matomo"

View file

@ -4,7 +4,7 @@
set -e

if [ -z "$1" ] || [ "$1" = "--help" ] ; then
echo "Usage: install-remote HOSTNAME"
echo "Usage: install-remote HOSTNAME [VERSION]"
exit 1
fi

@ -19,6 +19,7 @@ TMPFILE=$(mktemp --tmpdir weblate-log.XXXXXXXXXX)
bootstrap "$BOOTSTRAP"
cat >> "$BOOTSTRAP" <<EOT
WEBLATE_PASSWORD="$(apg -a 0 -M sncl -n 1 -x 10 -m 20)"
WEBLATE_VERSION="$2"
EOT

# shellcheck disable=SC1090

View file

@ -67,7 +67,7 @@ WEBLATE_HOME=~weblate

# Install Weblate and deps
sudo -u weblate virtualenv --python=python3 "$WEBLATE_HOME/weblate-env"
sudo -u weblate "$WEBLATE_HOME/weblate-env/bin/pip" install 'Weblate[all,zxcvbn]' wllegal
sudo -u weblate "$WEBLATE_HOME/weblate-env/bin/pip" install "Weblate[all,zxcvbn]$WEBLATE_VERSION" wllegal

PYVER=$(python3 -c 'import sys; print("{}.{}".format(*sys.version_info[:2]))')