diff options
author | Jocelyn Jaubert <jocelyn.jaubert@gmail.com> | 2021-11-15 22:51:38 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-11-22 08:52:54 +0100 |
commit | e7542293d6db519cce10f5d55c079a4f21482c2b (patch) | |
tree | 9415935a23dde1c76968183358410f54da3fadd7 | |
parent | 04868c13312c96f6c123716c9a04d6b03c544a4e (diff) | |
download | PeerTube-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.
-rwxr-xr-x | scripts/upgrade.sh | 8 |
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 | |||
68 | unzip -o "peertube-${VERSION}.zip" | 68 | unzip -o "peertube-${VERSION}.zip" |
69 | rm -f "peertube-${VERSION}.zip" | 69 | rm -f "peertube-${VERSION}.zip" |
70 | 70 | ||
71 | # Upgrade Scripts | 71 | # Launch yarn to check if we have all required dependencies |
72 | cd "$PEERTUBE_PATH/versions/peertube-${VERSION}" | ||
73 | NOCLIENT=1 yarn install --production --pure-lockfile | ||
74 | |||
75 | # Switch to latest code version | ||
72 | rm -rf $PEERTUBE_PATH/peertube-latest | 76 | rm -rf $PEERTUBE_PATH/peertube-latest |
73 | ln -s "$PEERTUBE_PATH/versions/peertube-${VERSION}" $PEERTUBE_PATH/peertube-latest | 77 | ln -s "$PEERTUBE_PATH/versions/peertube-${VERSION}" $PEERTUBE_PATH/peertube-latest |
74 | cd $PEERTUBE_PATH/peertube-latest | ||
75 | NOCLIENT=1 yarn install --production --pure-lockfile | ||
76 | cp $PEERTUBE_PATH/peertube-latest/config/default.yaml $PEERTUBE_PATH/config/default.yaml | 78 | cp $PEERTUBE_PATH/peertube-latest/config/default.yaml $PEERTUBE_PATH/config/default.yaml |
77 | 79 | ||
78 | echo "Differences in configuration files..." | 80 | echo "Differences in configuration files..." |