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

Merge branch 'master' into msm-update-nginx-conf

This commit is contained in:
Miguel Serrano 2024-11-19 12:57:15 +01:00 committed by GitHub
commit d430a30db0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 1 deletions

View file

@ -160,6 +160,16 @@ function handle_image_upgrade() {
set_server_pro_image_name "$SEED_IMAGE_VERSION"
docker pull "$IMAGE"
if [[ $GIT_BRIDGE_ENABLED == "true" ]]; then
if [[ -n ${GIT_BRIDGE_IMAGE:-} ]]; then
echo "------------------- WARNING ----------------------"
echo " You're using the custom git bridge image $GIT_BRIDGE_IMAGE"
echo " Before continuing you need to tag the updated image separately, making sure that:"
echo " 1. The Docker image is tagged with the new version: $SEED_IMAGE_VERSION"
echo " 2. The config/overleaf.rc entry GIT_BRIDGE_IMAGE only contains the image name, and not a tag/version."
echo " You wont be able to continue with this upgrade until you've tagged your custom image with $SEED_IMAGE_VERSION"
echo "------------------- WARNING ----------------------"
prompt "Has the custom image been tagged?"
fi
set_git_bridge_image_name "$SEED_IMAGE_VERSION"
docker pull "$GIT_BRIDGE_IMAGE"
fi

View file

@ -96,7 +96,15 @@ function set_git_bridge_image_name() {
else
image_name="quay.io/sharelatex/git-bridge"
fi
export GIT_BRIDGE_IMAGE="$image_name:$version"
# since we're reusing the GIT_BRIDGE_IMAGE environment variable, we check here if the version
# has already been added to it, for scenarios where this function is called more than once
if [[ "$image_name" == *"$version" ]]; then
export GIT_BRIDGE_IMAGE="$image_name"
else
export GIT_BRIDGE_IMAGE="$image_name:$version"
fi
}
function check_retracted_version() {