From: Jocelyn Jaubert Date: Mon, 15 Nov 2021 21:51:38 +0000 (+0100) Subject: Launch yarn before linking to new peertube version X-Git-Tag: v4.0.0-rc.1~64 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=e7542293d6db519cce10f5d55c079a4f21482c2b;hp=04868c13312c96f6c123716c9a04d6b03c544a4e;p=github%2FChocobozzz%2FPeerTube.git Launch yarn before linking to new peertube version If yarn fails because we don't have the correct nodejs version, we want to know earlier, so that we can upgrade nodejs without having a non-working half-installed peertube instance. --- diff --git a/scripts/upgrade.sh b/scripts/upgrade.sh index 59dc5ab26..9c17aecb8 100755 --- a/scripts/upgrade.sh +++ b/scripts/upgrade.sh @@ -68,11 +68,13 @@ cd $PEERTUBE_PATH/versions unzip -o "peertube-${VERSION}.zip" rm -f "peertube-${VERSION}.zip" -# Upgrade Scripts +# Launch yarn to check if we have all required dependencies +cd "$PEERTUBE_PATH/versions/peertube-${VERSION}" +NOCLIENT=1 yarn install --production --pure-lockfile + +# Switch to latest code version rm -rf $PEERTUBE_PATH/peertube-latest ln -s "$PEERTUBE_PATH/versions/peertube-${VERSION}" $PEERTUBE_PATH/peertube-latest -cd $PEERTUBE_PATH/peertube-latest -NOCLIENT=1 yarn install --production --pure-lockfile cp $PEERTUBE_PATH/peertube-latest/config/default.yaml $PEERTUBE_PATH/config/default.yaml echo "Differences in configuration files..."