X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Fupgrade.sh;h=e70576285bef4e30c8049b0b0a28ce6a56703fde;hb=f967d8be4dd7bc806d9b9c2d848cdadbe6752c16;hp=aa7804bd1d95b03f2d609b98aa552840f0ecc821;hpb=cf21b2cbef61929177b9c09b5e017c3b7eb8535d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/upgrade.sh b/scripts/upgrade.sh index aa7804bd1..e70576285 100755 --- a/scripts/upgrade.sh +++ b/scripts/upgrade.sh @@ -68,15 +68,18 @@ 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 -yarn install --production --pure-lockfile cp $PEERTUBE_PATH/peertube-latest/config/default.yaml $PEERTUBE_PATH/config/default.yaml echo "Differences in configuration files..." -diff -u $PEERTUBE_PATH/config/production.yaml "$PEERTUBE_PATH/versions/peertube-${VERSION}/config/production.yaml.example" +cd $PEERTUBE_PATH/versions +diff -u "$(ls --sort=t | head -2 | tail -1)/config/production.yaml.example" "$(ls --sort=t | head -1)/config/production.yaml.example" echo "" echo "==========================================="