ncp-update-nc: Add info if updating to another nc release than requested

Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
Tobias Knöppler 2024-08-12 10:43:44 +02:00
parent 2d5cfc543a
commit 63379519d4
No known key found for this signature in database
GPG Key ID: 44FD368932E645C1
2 changed files with 11 additions and 1 deletions

View File

@ -325,7 +325,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
subject="$(git tag -n10 --format="%(contents:subject)" "${{ env.VERSION }}")" subject="$(git tag -n10 --format="%(contents:subject)" "${{ env.VERSION }}")"
body="$(git tag -n10 --format="%(contents:body)" "${{ env.VERSION }}")" body="$(git tag -n30 --format="%(contents:body)" "${{ env.VERSION }}")"
separator=" separator="
--- ---

View File

@ -54,11 +54,21 @@ then
exit 1 exit 1
fi fi
if [[ "$MAJOR_NEW" -ge 29 ]] && [[ "$(lsb_release -r)" =~ .*12 ]]
then
echo -e "NCP doesn't support Nextcloud versions greater than 28 with Debian 11 (Bullseye). Please run ncp-dist-upgrade."
exit 1
fi
grep -qP "\d+\.\d+\.\d+" <<<"$CURRENT" || { echo "Malformed version $CURRENT"; exit 1; } grep -qP "\d+\.\d+\.\d+" <<<"$CURRENT" || { echo "Malformed version $CURRENT"; exit 1; }
grep -qP "\d+\.\d+\.\d+" <<<"$TARGET_VERSION" || { echo "Malformed version $TARGET_VERSION" ; exit 1; } grep -qP "\d+\.\d+\.\d+" <<<"$TARGET_VERSION" || { echo "Malformed version $TARGET_VERSION" ; exit 1; }
echo "Current Nextcloud version $CURRENT" echo "Current Nextcloud version $CURRENT"
echo "Available Nextcloud version $TARGET_VERSION" echo "Available Nextcloud version $TARGET_VERSION"
if [[ "$TARGET_VERSION" != "$VER" ]]
then
echo "INFO: You have requested an update to '$VER', but a direct update to '$VER' cannot be performed, so the latest available version that can be updated to has been selected automatically."
fi
# make sure that cron.php is not running and there are no pending jobs # make sure that cron.php is not running and there are no pending jobs
# https://github.com/nextcloud/server/issues/10949 # https://github.com/nextcloud/server/issues/10949