1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-23 09:58:27 +00:00

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
This commit is contained in:
eric-j-ason
2025-08-19 20:49:01 +02:00
committed by GitHub
parent 9790f128cc
commit c4b70c57bc

View File

@@ -85,7 +85,7 @@ fi
# confirm update # confirm update
echo "Checking currently installed version..." echo "Checking currently installed version..."
current=$(giteacmd --version | cut -d ' ' -f 3) 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 if [[ -z "${no_confirm:-}" ]]; then
echo "Make sure to read the changelog first: https://github.com/go-gitea/gitea/blob/main/CHANGELOG.md" 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)" echo "Are you ready to update Gitea from ${current} to ${giteaversion}? (y/N)"