mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-22 08:46:54 -06:00
Add upgrade script
This commit is contained in:
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"
|
||||
|
16
scripts/upgrade.sh
Executable file
16
scripts/upgrade.sh
Executable file
@ -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
Block a user