Tweak upgrade script to take PR branch name as argument
This commit is contained in:
		
							parent
							
								
									96b3419227
								
							
						
					
					
						commit
						7b390f0137
					
				@ -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" ]
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user