]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - scripts/upgrade.sh
Remove Node 4 support
[github/Chocobozzz/PeerTube.git] / scripts / upgrade.sh
CommitLineData
9f540774
C
1#!/usr/bin/env sh
2
85ec3eb7
C
3nodeMinVersion="v6.0.0"
4npmMinVersion="3.0.0"
9f540774 5
85ec3eb7
C
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
9f540774 15
d16a0ad8 16if pgrep peertube > /dev/null; then
9f540774
C
17 echo 'PeerTube is running!'
18 exit 0
19fi
20
85ec3eb7
C
21git pull origin $(git rev-parse --abbrev-ref HEAD) || exit -1
22
9f540774
C
23npm install
24npm update
25cd client && npm update && cd ../
26npm run build
27
28echo "\n\nUpgrade finished! You can restart PeerTube that may run the migration scripts."