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 81d05e23b8
commit 7f7c6ef6f8
No known key found for this signature in database
GPG key ID: A394E332255A6173
3 changed files with 18 additions and 9 deletions

View file

@ -3,12 +3,19 @@ for site in mainnet liquid testnet bisq
do
git clone https://github.com/mempool/mempool "${HOME}/${site}"
mkdir -p "${HOME}/public_html/${site}/"
cd "${HOME}/${site}/backend/"
cp "../production/mempool-config.${site}.json" "mempool-config.json"
touch cache.json
npm install
npm run build
if [ "${site}" = "mainnet" ]
then
cd "${HOME}/${site}/frontend/"
npm install
npm run build
rsync -av ./dist/mempool/* "${HOME}/public_html/${site}/"
fi
done

View file

@ -0,0 +1,2 @@
#!/usr/bin/env zsh
killall sh node

View file

@ -7,13 +7,13 @@ 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" ]