Remove Node 4 support
authorChocobozzz <florian.bigard@gmail.com>
Wed, 26 Apr 2017 20:32:33 +0000 (22:32 +0200)
committerChocobozzz <florian.bigard@gmail.com>
Wed, 26 Apr 2017 20:32:33 +0000 (22:32 +0200)
.travis.yml
README.md
scripts/upgrade.sh

index 76efedd50d8c325f07211662f7a08c98db89f2ce..068067796a0cb2d9712222c88bef5698dc399192 100644 (file)
@@ -1,7 +1,6 @@
 language: node_js
 
 node_js:
-  - "4"
   - "6"
 
 env:
index 750522dd6905015f45e0c3565dd2076ce1d58f9f..6e54e5bdb6313d938d1295c233d607dfcfaf443f 100644 (file)
--- a/README.md
+++ b/README.md
@@ -121,7 +121,7 @@ See [wiki](https://github.com/Chocobozzz/PeerTube/wiki) for complete installatio
 
 ### Dependencies
 
-  * **NodeJS >= 4.x**
+  * **NodeJS >= 6.x**
   * **npm >= 3.x**
   * OpenSSL (cli)
   * PostgreSQL
@@ -129,13 +129,12 @@ See [wiki](https://github.com/Chocobozzz/PeerTube/wiki) for complete installatio
 
 #### Debian
 
-  * Install NodeJS 4.x (actual LTS): [https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions)
+  * Install NodeJS 6.x (actual LTS): [https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions)
   * Add jessie backports to your *source.list*: http://backports.debian.org/Instructions/
   * Run:
 
         # apt-get update
         # apt-get install ffmpeg postgresql-9.4 openssl
-        # npm install -g npm@3
 
 #### Other distribution... (PR welcome)
 
index 022e76107dd9ac2ae04ea6c9841198322bb73e29..59deae1ebf8658bcabd207967d5286bd6d92e5cd 100755 (executable)
@@ -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 ../