diff options
-rwxr-xr-x | scripts/upgrade.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/upgrade.sh b/scripts/upgrade.sh index 59deae1eb..f974d68e0 100755 --- a/scripts/upgrade.sh +++ b/scripts/upgrade.sh | |||
@@ -13,6 +13,11 @@ if [[ $(npm --version) < $npmMinVersion ]]; then | |||
13 | exit 0 | 13 | exit 0 |
14 | fi | 14 | fi |
15 | 15 | ||
16 | if ! which yarn > /dev/null; then | ||
17 | echo 'You need yarn' | ||
18 | exit 0 | ||
19 | fi | ||
20 | |||
16 | if pgrep peertube > /dev/null; then | 21 | if pgrep peertube > /dev/null; then |
17 | echo 'PeerTube is running!' | 22 | echo 'PeerTube is running!' |
18 | exit 0 | 23 | exit 0 |
@@ -20,9 +25,9 @@ fi | |||
20 | 25 | ||
21 | git pull origin $(git rev-parse --abbrev-ref HEAD) || exit -1 | 26 | git pull origin $(git rev-parse --abbrev-ref HEAD) || exit -1 |
22 | 27 | ||
23 | npm install | 28 | yarn install |
24 | npm update | 29 | yarn update |
25 | cd client && npm update && cd ../ | 30 | cd client && yarn update && cd ../ |
26 | npm run build | 31 | npm run build |
27 | 32 | ||
28 | echo "\n\nUpgrade finished! You can restart PeerTube that may run the migration scripts." | 33 | echo "\n\nUpgrade finished! You can restart PeerTube that may run the migration scripts." |