Skip to content

Commit

Permalink
Merge pull request #20 from matter-labs/fix_dev_env_contract_addr
Browse files Browse the repository at this point in the history
Fix CONTRACT_ADDR substitution
  • Loading branch information
dvush authored Jul 2, 2019
2 parents 6099358 + 21fbfa3 commit 8509f12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/deploy-contracts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ if [ ! -z "$NEW_CONTRACT" ]
then
echo New contract at $NEW_CONTRACT

OLD_CONTRACT=`grep CONTRACT_ADDR ./$ENV_FILE | grep -oE '=(.+)' | sed -n "s/=//p"`
OLD_CONTRACT=`grep "^CONTRACT_ADDR" ./$ENV_FILE | grep -oE '=(.+)' | sed -n "s/=//p"`
echo Old contract at $OLD_CONTRACT

mkdir -p logs/$LABEL/
cp deploy.log logs/$LABEL/deploy.log
cp ./$ENV_FILE logs/$LABEL/$FRANKLIN_ENV.bak

sed -i".bak" "s/CONTRACT_ADDR=$OLD_CONTRACT/CONTRACT_ADDR=$NEW_CONTRACT/g" ./$ENV_FILE
sed -i".bak" "s/^CONTRACT_ADDR=$OLD_CONTRACT/CONTRACT_ADDR=$NEW_CONTRACT/g" ./$ENV_FILE

echo successfully deployed contracts

Expand Down

0 comments on commit 8509f12

Please sign in to comment.