diff options
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | README.md | 5 | ||||
-rwxr-xr-x | scripts/upgrade.sh | 14 |
3 files changed, 15 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml index 76efedd50..068067796 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -1,7 +1,6 @@ | |||
1 | language: node_js | 1 | language: node_js |
2 | 2 | ||
3 | node_js: | 3 | node_js: |
4 | - "4" | ||
5 | - "6" | 4 | - "6" |
6 | 5 | ||
7 | env: | 6 | env: |
@@ -121,7 +121,7 @@ See [wiki](https://github.com/Chocobozzz/PeerTube/wiki) for complete installatio | |||
121 | 121 | ||
122 | ### Dependencies | 122 | ### Dependencies |
123 | 123 | ||
124 | * **NodeJS >= 4.x** | 124 | * **NodeJS >= 6.x** |
125 | * **npm >= 3.x** | 125 | * **npm >= 3.x** |
126 | * OpenSSL (cli) | 126 | * OpenSSL (cli) |
127 | * PostgreSQL | 127 | * PostgreSQL |
@@ -129,13 +129,12 @@ See [wiki](https://github.com/Chocobozzz/PeerTube/wiki) for complete installatio | |||
129 | 129 | ||
130 | #### Debian | 130 | #### Debian |
131 | 131 | ||
132 | * 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) | 132 | * 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) |
133 | * Add jessie backports to your *source.list*: http://backports.debian.org/Instructions/ | 133 | * Add jessie backports to your *source.list*: http://backports.debian.org/Instructions/ |
134 | * Run: | 134 | * Run: |
135 | 135 | ||
136 | # apt-get update | 136 | # apt-get update |
137 | # apt-get install ffmpeg postgresql-9.4 openssl | 137 | # apt-get install ffmpeg postgresql-9.4 openssl |
138 | # npm install -g npm@3 | ||
139 | 138 | ||
140 | #### Other distribution... (PR welcome) | 139 | #### Other distribution... (PR welcome) |
141 | 140 | ||
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 ../ |