From c4b70c57bca1063337ce2bbacbae181b5246ae23 Mon Sep 17 00:00:00 2001 From: eric-j-ason <75301977+eric-j-ason@users.noreply.github.com> Date: Tue, 19 Aug 2025 20:49:01 +0200 Subject: [PATCH] exit with success when already up to date (#35312) Exit `upgrade.sh` with status 0 (instead of status 1) when the installed Gitea is already on the latest version and nothing needs to be done. Fixes #35309 --- contrib/upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/upgrade.sh b/contrib/upgrade.sh index 4b166a02a0..e5e296ea8b 100755 --- a/contrib/upgrade.sh +++ b/contrib/upgrade.sh @@ -85,7 +85,7 @@ fi # confirm update echo "Checking currently installed version..." current=$(giteacmd --version | cut -d ' ' -f 3) -[[ "$current" == "$giteaversion" ]] && echo "$current is already installed, stopping." && exit 1 +[[ "$current" == "$giteaversion" ]] && echo "$current is already installed, stopping." && exit 0 if [[ -z "${no_confirm:-}" ]]; then echo "Make sure to read the changelog first: https://github.com/go-gitea/gitea/blob/main/CHANGELOG.md" echo "Are you ready to update Gitea from ${current} to ${giteaversion}? (y/N)"