Minor tweaks to production, use git pull --rebase, only build 1 frontend

This commit is contained in:
wiz
2020-07-25 01:45:30 +09:00
parent 77dacfdb6e
commit d1cbb6446c
3 changed files with 18 additions and 9 deletions

View File

@@ -7,21 +7,21 @@ touch $HOME/lock
echo 'rebuilding mempool sites'|wall
cd "$HOME/mempool"
git pull origin master
git pull --rebase origin master
cd "$HOME/"
for site in mainnet liquid testnet bisq
do
cd "$HOME/${site}"
git pull origin master
git pull --rebase origin master
hash=$(git rev-parse HEAD)
if [ "${site}" = "mainnet" ]
then
cd "$HOME/${site}/frontend"
npm install
npm run build
rsync -av ./dist/mempool/* "${HOME}/public_html/${site}/"
cd "$HOME/${site}/frontend"
npm install
npm run build
rsync -av ./dist/mempool/* "${HOME}/public_html/${site}/"
fi
cd "$HOME/${site}/backend"