diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/upgrade.sh | 14 |
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 | ||
3 | nodeMinVersion="v6.0.0" | ||
4 | npmMinVersion="3.0.0" | ||
3 | 5 | ||
4 | git pull origin $(git rev-parse --abbrev-ref HEAD) || exit -1 | 6 | if [[ $(node --version) < $nodeMinVersion ]]; then |
7 | echo 'You need node >= 6' | ||
8 | exit 0 | ||
9 | fi | ||
10 | |||
11 | if [[ $(npm --version) < $npmMinVersion ]]; then | ||
12 | echo 'You need npm >= 3' | ||
13 | exit 0 | ||
14 | fi | ||
5 | 15 | ||
6 | if pgrep peertube > /dev/null; then | 16 | if pgrep peertube > /dev/null; then |
7 | echo 'PeerTube is running!' | 17 | echo 'PeerTube is running!' |
8 | exit 0 | 18 | exit 0 |
9 | fi | 19 | fi |
10 | 20 | ||
21 | git pull origin $(git rev-parse --abbrev-ref HEAD) || exit -1 | ||
22 | |||
11 | npm install | 23 | npm install |
12 | npm update | 24 | npm update |
13 | cd client && npm update && cd ../ | 25 | cd client && npm update && cd ../ |