aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/upgrade-peertube.sh
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-15 18:23:17 +0100
committerChocobozzz <me@florianbigard.com>2018-01-15 18:23:17 +0100
commit2d13b29965482cebfd2070d5acf010af75416925 (patch)
treed9adddf4f2642931468520a72ac8445b0b92f9fc /scripts/upgrade-peertube.sh
parent3b6eaa921fa93fb44d7332f31e08d1f2cd382f23 (diff)
downloadPeerTube-2d13b29965482cebfd2070d5acf010af75416925.tar.gz
PeerTube-2d13b29965482cebfd2070d5acf010af75416925.tar.zst
PeerTube-2d13b29965482cebfd2070d5acf010af75416925.zip
Remove npm run upgrade
Use command from production.md instead
Diffstat (limited to 'scripts/upgrade-peertube.sh')
-rwxr-xr-xscripts/upgrade-peertube.sh38
1 files changed, 0 insertions, 38 deletions
diff --git a/scripts/upgrade-peertube.sh b/scripts/upgrade-peertube.sh
deleted file mode 100755
index bfef38264..000000000
--- a/scripts/upgrade-peertube.sh
+++ /dev/null
@@ -1,38 +0,0 @@
1#!/bin/bash
2
3verlte() {
4 [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
5}
6
7nodeMinVersion="8.0.0"
8npmMinVersion="3.0.0"
9
10actualNodeVersion=$(node --version | tr -d "v")
11actualNpmVersion=$(npm --version)
12
13if verlte $actualNodeVersion $nodeMinVersion; then
14 echo 'You need node >= 8'
15 exit 0
16fi
17
18if verlte $actualNpmVersion $npmMinVersion; then
19 echo 'You need npm >= 3'
20 exit 0
21fi
22
23if ! which yarn > /dev/null; then
24 echo 'You need yarn'
25 exit 0
26fi
27
28if pgrep peertube > /dev/null; then
29 echo 'PeerTube is running, please shut it off before upgrading'
30 exit 0
31fi
32
33git pull origin $(git rev-parse --abbrev-ref HEAD) || exit -1
34
35yarn install --pure-lockfile
36npm run build
37
38echo -e "\n\nUpgrade finished! You can restart PeerTube that may run the migration scripts."