Modify upgrade script to allow reverting to a specific git hash or tag

This commit is contained in:
wiz 2020-10-19 19:43:30 +09:00
parent cbef2ae6d0
commit eb00b92996
No known key found for this signature in database
GPG Key ID: A394E332255A6173

View File

@ -13,14 +13,15 @@ source "$NVM_DIR/nvm.sh"
REPO=origin
BRANCH=master
if [ ! -z "$1" ];then
BRANCH=$1
fi
echo "upgrading mempool to ${BRANCH}" | wall
TAG="${REPO}/${BRANCH}"
[ ! -z "$1" ] && TAG=$1
echo "upgrading mempool to ${TAG}" | wall
cd "$HOME/mempool"
git fetch "${REPO}"
git reset --hard "${REPO}/${BRANCH}"
git reset --hard "${TAG}"
cd "$HOME/"
for site in mainnet liquid testnet bisq