From 3cdf79e896aab6a764ca081f2b875058b353441c Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bonicoli Date: Sun, 6 Mar 2022 05:41:47 +0100 Subject: [PATCH] 'upgrade' step: run the migrate command first --- upgrade.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/upgrade.sh b/upgrade.sh index 719690d..8fbec18 100755 --- a/upgrade.sh +++ b/upgrade.sh @@ -2,7 +2,8 @@ #VERSION=x.x.x -BINDIR=/srv/gitea/bin +WORKDIR=/srv/gitea +BINDIR=$WORKDIR/bin GITEA_URL='http://127.0.0.1:3000' function err_report() { @@ -45,6 +46,7 @@ function backup() { function upgrade() { set -ex + su - gitea -c "WORKDIR=$WORKDIR $BINDIR/gitea-$VERSION-linux-amd64 --config /etc/gitea/gitea.ini migrate" ln --force $BINDIR/gitea-$VERSION-linux-amd64 $BINDIR/gitea set +x }