aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/upgrade.sh
diff options
context:
space:
mode:
authorJocelyn Jaubert <jocelyn.jaubert@gmail.com>2021-11-15 22:51:38 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-11-22 08:52:54 +0100
commite7542293d6db519cce10f5d55c079a4f21482c2b (patch)
tree9415935a23dde1c76968183358410f54da3fadd7 /scripts/upgrade.sh
parent04868c13312c96f6c123716c9a04d6b03c544a4e (diff)
downloadPeerTube-e7542293d6db519cce10f5d55c079a4f21482c2b.tar.gz
PeerTube-e7542293d6db519cce10f5d55c079a4f21482c2b.tar.zst
PeerTube-e7542293d6db519cce10f5d55c079a4f21482c2b.zip
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.
Diffstat (limited to 'scripts/upgrade.sh')
-rwxr-xr-xscripts/upgrade.sh8
1 files changed, 5 insertions, 3 deletions
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
68unzip -o "peertube-${VERSION}.zip" 68unzip -o "peertube-${VERSION}.zip"
69rm -f "peertube-${VERSION}.zip" 69rm -f "peertube-${VERSION}.zip"
70 70
71# Upgrade Scripts 71# Launch yarn to check if we have all required dependencies
72cd "$PEERTUBE_PATH/versions/peertube-${VERSION}"
73NOCLIENT=1 yarn install --production --pure-lockfile
74
75# Switch to latest code version
72rm -rf $PEERTUBE_PATH/peertube-latest 76rm -rf $PEERTUBE_PATH/peertube-latest
73ln -s "$PEERTUBE_PATH/versions/peertube-${VERSION}" $PEERTUBE_PATH/peertube-latest 77ln -s "$PEERTUBE_PATH/versions/peertube-${VERSION}" $PEERTUBE_PATH/peertube-latest
74cd $PEERTUBE_PATH/peertube-latest
75NOCLIENT=1 yarn install --production --pure-lockfile
76cp $PEERTUBE_PATH/peertube-latest/config/default.yaml $PEERTUBE_PATH/config/default.yaml 78cp $PEERTUBE_PATH/peertube-latest/config/default.yaml $PEERTUBE_PATH/config/default.yaml
77 79
78echo "Differences in configuration files..." 80echo "Differences in configuration files..."