Skip to content

Commit c4b70c5

Browse files
authored
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
1 parent 9790f12 commit c4b70c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/upgrade.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ fi
8585
# confirm update
8686
echo "Checking currently installed version..."
8787
current=$(giteacmd --version | cut -d ' ' -f 3)
88-
[[ "$current" == "$giteaversion" ]] && echo "$current is already installed, stopping." && exit 1
88+
[[ "$current" == "$giteaversion" ]] && echo "$current is already installed, stopping." && exit 0
8989
if [[ -z "${no_confirm:-}" ]]; then
9090
echo "Make sure to read the changelog first: https://github.com/go-gitea/gitea/blob/main/CHANGELOG.md"
9191
echo "Are you ready to update Gitea from ${current} to ${giteaversion}? (y/N)"

0 commit comments

Comments
 (0)