mirror of
https://gh.llkk.cc/https://github.com/WeblateOrg/scripts.git
synced 2025-10-03 15:01:00 +08:00
Support for defining version to use
This commit is contained in:
parent
40a613abfe
commit
c3fb75bd53
3 changed files with 4 additions and 2 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]))')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue