From f8d5ecb47b33ec5d7db846668171b602c71c38a6 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Fri, 17 Jan 2025 02:22:12 +0100 Subject: [PATCH] fix: upgrade: add missing check for migration warnings and errors Refs: https://codeberg.org/forgejo/forgejo/issues/6583 --- upgrade/upgrade.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/upgrade/upgrade.sh b/upgrade/upgrade.sh index 377399d1..3248e830 100755 --- a/upgrade/upgrade.sh +++ b/upgrade/upgrade.sh @@ -57,6 +57,10 @@ function migration_assert() { grep --quiet 'ORM engine initialization successful' $logfile if grep 'serveInstalled() \[[EW]\] Table' $logfile; then + echo "unexpected warnings in database initialization" + return 1 + fi + if grep 'Migrate() \[[EW]\]' $logfile; then echo "unexpected warnings in database migration" return 1 fi @@ -64,6 +68,8 @@ function migration_assert() { function test_gitea_upgrades() { local config=$UPGRADE_DIR/default-app.ini + # The Forgejo target migration version must be 10.0 because it is the last supported. + # https://forgejo.org/2024-12-gitea-compatibility/ ( echo gitea 1.21 forgejo 10.0 echo gitea 1.22 forgejo 10.0