aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/upgrade.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/upgrade.sh b/scripts/upgrade.sh
index 022e76107..59deae1eb 100755
--- a/scripts/upgrade.sh
+++ b/scripts/upgrade.sh
@@ -1,13 +1,25 @@
1#!/usr/bin/env sh 1#!/usr/bin/env sh
2 2
3nodeMinVersion="v6.0.0"
4npmMinVersion="3.0.0"
3 5
4git pull origin $(git rev-parse --abbrev-ref HEAD) || exit -1 6if [[ $(node --version) < $nodeMinVersion ]]; then
7 echo 'You need node >= 6'
8 exit 0
9fi
10
11if [[ $(npm --version) < $npmMinVersion ]]; then
12 echo 'You need npm >= 3'
13 exit 0
14fi
5 15
6if pgrep peertube > /dev/null; then 16if pgrep peertube > /dev/null; then
7 echo 'PeerTube is running!' 17 echo 'PeerTube is running!'
8 exit 0 18 exit 0
9fi 19fi
10 20
21git pull origin $(git rev-parse --abbrev-ref HEAD) || exit -1
22
11npm install 23npm install
12npm update 24npm update
13cd client && npm update && cd ../ 25cd client && npm update && cd ../