mirror of https://github.com/Chocobozzz/PeerTube
Add upgrade script
parent
469526e14d
commit
9f540774b1
|
@ -31,6 +31,7 @@
|
|||
"dev": "scripty",
|
||||
"start": "node server",
|
||||
"check": "scripty",
|
||||
"upgrade": "scripty",
|
||||
"test": "scripty",
|
||||
"help": "scripty",
|
||||
"postinstall": "cd client && npm install"
|
||||
|
|
|
@ -16,5 +16,6 @@ printf " play -> Run 3 fresh nodes so that you can test the com
|
|||
printf " dev -> Watch, run the livereload and run the server so that you can develop the application\n"
|
||||
printf " start -> Run the server\n"
|
||||
printf " check -> Check the server (according to NODE_ENV)\n"
|
||||
printf " upgrade -- [branch] -> Upgrade the application according to the [branch] parameter\n"
|
||||
printf " test -> Run the tests\n"
|
||||
printf " help -> Print this help\n"
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
|
||||
git pull origin $(git rev-parse --abbrev-ref HEAD) || exit -1
|
||||
|
||||
if [[ `pgrep peertube` > /dev/null ]]; then
|
||||
echo 'PeerTube is running!'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
npm install
|
||||
npm update
|
||||
cd client && npm update && cd ../
|
||||
npm run build
|
||||
|
||||
echo "\n\nUpgrade finished! You can restart PeerTube that may run the migration scripts."
|
Loading…
Reference in New Issue