mirror of
https://github.com/mempool/mempool.git
synced 2025-01-18 05:12:35 +01:00
Tweak upgrade script to take PR branch name as argument
This commit is contained in:
parent
774893f2fc
commit
c48a151e21
@ -11,16 +11,23 @@ touch $HOME/lock
|
|||||||
export NVM_DIR="$HOME/.nvm"
|
export NVM_DIR="$HOME/.nvm"
|
||||||
source "$NVM_DIR/nvm.sh"
|
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"
|
cd "$HOME/mempool"
|
||||||
git pull --rebase origin master
|
git fetch "${REPO}"
|
||||||
|
git reset --hard "${REPO}/${BRANCH}"
|
||||||
cd "$HOME/"
|
cd "$HOME/"
|
||||||
|
|
||||||
for site in mainnet liquid testnet bisq
|
for site in mainnet liquid testnet bisq
|
||||||
do
|
do
|
||||||
cd "$HOME/${site}"
|
cd "$HOME/${site}"
|
||||||
git pull --rebase origin master
|
git fetch "${REPO}"
|
||||||
|
git reset --hard "${REPO}/${BRANCH}"
|
||||||
hash=$(git rev-parse HEAD)
|
hash=$(git rev-parse HEAD)
|
||||||
|
|
||||||
if [ "${site}" = "mainnet" ]
|
if [ "${site}" = "mainnet" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user