aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-10-21 14:23:20 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-10-21 14:23:20 +0200
commit9f540774b1fa2d9035a8b19dd1901247b112ead5 (patch)
tree4a3923e607bb9c479657985fca8bc807bc951523 /scripts
parent469526e14d9e0328f5baca90c9d09d173cb8a70a (diff)
downloadPeerTube-9f540774b1fa2d9035a8b19dd1901247b112ead5.tar.gz
PeerTube-9f540774b1fa2d9035a8b19dd1901247b112ead5.tar.zst
PeerTube-9f540774b1fa2d9035a8b19dd1901247b112ead5.zip
Add upgrade script
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/help.sh1
-rwxr-xr-xscripts/upgrade.sh16
2 files changed, 17 insertions, 0 deletions
diff --git a/scripts/help.sh b/scripts/help.sh
index fdccabbf0..23c460afa 100755
--- a/scripts/help.sh
+++ b/scripts/help.sh
@@ -16,5 +16,6 @@ printf " play -> Run 3 fresh nodes so that you can test the com
16printf " dev -> Watch, run the livereload and run the server so that you can develop the application\n" 16printf " dev -> Watch, run the livereload and run the server so that you can develop the application\n"
17printf " start -> Run the server\n" 17printf " start -> Run the server\n"
18printf " check -> Check the server (according to NODE_ENV)\n" 18printf " check -> Check the server (according to NODE_ENV)\n"
19printf " upgrade -- [branch] -> Upgrade the application according to the [branch] parameter\n"
19printf " test -> Run the tests\n" 20printf " test -> Run the tests\n"
20printf " help -> Print this help\n" 21printf " help -> Print this help\n"
diff --git a/scripts/upgrade.sh b/scripts/upgrade.sh
new file mode 100755
index 000000000..1299ac55a
--- /dev/null
+++ b/scripts/upgrade.sh
@@ -0,0 +1,16 @@
1#!/usr/bin/env sh
2
3
4git pull origin $(git rev-parse --abbrev-ref HEAD) || exit -1
5
6if [[ `pgrep peertube` > /dev/null ]]; then
7 echo 'PeerTube is running!'
8 exit 0
9fi
10
11npm install
12npm update
13cd client && npm update && cd ../
14npm run build
15
16echo "\n\nUpgrade finished! You can restart PeerTube that may run the migration scripts."