X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Fupgrade.sh;h=9c17aecb89da629499e1da94a756e80446fdf730;hb=a356ffa66b24c972fb72931d4a0dc905122e60a1;hp=12629ad650dc9927b423c2c0588f3877fb042416;hpb=86dc0b9cc9374cba7548bb613ff43d92f90570a8;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/upgrade.sh b/scripts/upgrade.sh index 12629ad65..9c17aecb8 100755 --- a/scripts/upgrade.sh +++ b/scripts/upgrade.sh @@ -2,7 +2,7 @@ set -eu -PEERTUBE_PATH=${1:-/var/www/peertube/} +PEERTUBE_PATH=${1:-/var/www/peertube} if [ ! -e "$PEERTUBE_PATH" ]; then echo "Error - path \"$PEERTUBE_PATH\" wasn't found" @@ -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 -yarn install --production --pure-lockfile cp $PEERTUBE_PATH/peertube-latest/config/default.yaml $PEERTUBE_PATH/config/default.yaml echo "Differences in configuration files..."