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.
pull/4562/head
Jocelyn Jaubert 2021-11-15 22:51:38 +01:00 committed by Chocobozzz
parent 04868c1331
commit e7542293d6
1 changed files with 5 additions and 3 deletions

View File

@ -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..."