1
0
Fork 0
mirror of https://github.com/overleaf/toolkit.git synced 2025-04-19 15:28:06 +02:00

Update bin/upgrade to prompt for config file rebrand

This commit is contained in:
mserranom 2024-02-14 09:35:36 +01:00
parent cfe060b4f4
commit 1446e54590

View file

@ -158,10 +158,12 @@ function handle_image_upgrade() {
echo "Over-writing config/version with $SEED_IMAGE_VERSION"
cp "$TOOLKIT_ROOT/lib/config-seed/version" "$TOOLKIT_ROOT/config/version"
if [[ "$IMAGE_VERSION_MAJOR" -le 4 && "$SEED_IMAGE_VERSION_MAJOR" -ge 5 ]]; then
echo "Renaming environment variables in config/variables.env"
## Rename variables in overleaf.rc SHARELATEX_ -> OVERLEAF_
rebrand_sharelatex_env_variables 'overleaf.rc'
if [[ "$IMAGE_VERSION_MAJOR" -le 4 && "$SEED_IMAGE_VERSION_MAJOR" -ge 5 ]]; then
echo "Renaming environment variables in config/variables.env and config/overleaf.rc"
prompt "Proceed with the environment variable renaming?"
rebrand_sharelatex_env_variables
rebrand_sharelatex_env_variables 'variables.env'
fi
## Maybe offer to start services again
@ -217,7 +219,6 @@ function __main__() {
fi
handle_git_update
read_seed_image_version
read_image_version
handle_image_upgrade