From 85ec3eb7f37d71be99566c6c5c43f0f8a80b9b09 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 26 Apr 2017 22:32:33 +0200 Subject: Remove Node 4 support --- scripts/upgrade.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'scripts') 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 @@ #!/usr/bin/env sh +nodeMinVersion="v6.0.0" +npmMinVersion="3.0.0" -git pull origin $(git rev-parse --abbrev-ref HEAD) || exit -1 +if [[ $(node --version) < $nodeMinVersion ]]; then + echo 'You need node >= 6' + exit 0 +fi + +if [[ $(npm --version) < $npmMinVersion ]]; then + echo 'You need npm >= 3' + exit 0 +fi if pgrep peertube > /dev/null; then echo 'PeerTube is running!' exit 0 fi +git pull origin $(git rev-parse --abbrev-ref HEAD) || exit -1 + npm install npm update cd client && npm update && cd ../ -- cgit v1.2.3