aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/upgrade-peertube.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/upgrade-peertube.sh')
-rwxr-xr-xscripts/upgrade-peertube.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/scripts/upgrade-peertube.sh b/scripts/upgrade-peertube.sh
new file mode 100755
index 000000000..ff6dce94f
--- /dev/null
+++ b/scripts/upgrade-peertube.sh
@@ -0,0 +1,31 @@
1#!/bin/bash
2
3nodeMinVersion="v6.0.0"
4npmMinVersion="3.0.0"
5
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
15
16if ! which yarn > /dev/null; then
17 echo 'You need yarn'
18 exit 0
19fi
20
21if pgrep peertube > /dev/null; then
22 echo 'PeerTube is running!'
23 exit 0
24fi
25
26git pull origin $(git rev-parse --abbrev-ref HEAD) || exit -1
27
28yarn install --pure-lockfile
29npm run build
30
31echo "\n\nUpgrade finished! You can restart PeerTube that may run the migration scripts."