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

Merge pull request #86 from overleaf/msm-warning-major-update

prompt warning on major version upgrades
This commit is contained in:
Miguel Serrano 2022-01-10 20:21:58 +01:00 committed by GitHub
commit 00257fc8a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,6 +101,13 @@ function handle_image_upgrade() {
echo "New docker image version available ($seed_image_version)"
echo "Current image version is '$user_image_version' (from config/version)"
local user_image_major_version="$(echo "$user_image_version" | awk -F. '{print $1}')"
local seed_image_major_version="$(echo "$seed_image_version" | awk -F. '{print $1}')"
if [[ "$seed_image_major_version" > "$user_image_major_version" ]]; then
echo "WARNING: this is a major version update, please check the Release Notes for breaking changes before proceeding:"
echo "* https://github.com/overleaf/overleaf/wiki#release-notes"
fi
local should_upgrade="n"
read -r -p "Upgrade image? [y/n] " should_upgrade