Tweak upgrade script to take PR branch name as argument

This commit is contained in:
wiz 2020-10-08 01:35:54 +09:00
parent 774893f2fc
commit c48a151e21
No known key found for this signature in database
GPG Key ID: A394E332255A6173

View File

@ -11,16 +11,23 @@ touch $HOME/lock
export NVM_DIR="$HOME/.nvm"
source "$NVM_DIR/nvm.sh"
echo 'upgrading mempool'|wall
REPO=origin
BRANCH=master
if [ ! -z "$1" ];then
BRANCH=$1
fi
echo "upgrading mempool to ${BRANCH}" | wall
cd "$HOME/mempool"
git pull --rebase origin master
git fetch "${REPO}"
git reset --hard "${REPO}/${BRANCH}"
cd "$HOME/"
for site in mainnet liquid testnet bisq
do
cd "$HOME/${site}"
git pull --rebase origin master
git fetch "${REPO}"
git reset --hard "${REPO}/${BRANCH}"
hash=$(git rev-parse HEAD)
if [ "${site}" = "mainnet" ]