'upgrade' step: run the migrate command first

This commit is contained in:
Pierre-Louis Bonicoli 2022-03-06 05:41:47 +01:00
parent e929d49715
commit 3cdf79e896
Signed by: pilou
GPG Key ID: 06914C4A5EDAA6DD

View File

@ -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
}