From 99d4db9753dfe054d9a9a760eca0b44bb3d6a378 Mon Sep 17 00:00:00 2001 From: apostolof Date: Sat, 13 Feb 2021 16:25:53 +0200 Subject: [PATCH] refactor: use env vars during migration in docker image --- docker/concordia-contracts/migrate.sh | 4 +++- packages/concordia-contracts/package.json | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) mode change 100644 => 100755 docker/concordia-contracts/migrate.sh diff --git a/docker/concordia-contracts/migrate.sh b/docker/concordia-contracts/migrate.sh old mode 100644 new mode 100755 index 20a813f..f44afa0 --- a/docker/concordia-contracts/migrate.sh +++ b/docker/concordia-contracts/migrate.sh @@ -3,4 +3,6 @@ export CHAIN_HOST="$DEPLOY_CHAIN_HOST" export CHAIN_PORT="$DEPLOY_CHAIN_PORT" -cd /usr/src/concordia/packages/concordia-contracts && yarn _migrate --network "${MIGRATE_NETWORK}" --reset && yarn upload +cd /usr/src/concordia/packages/concordia-contracts && + yarn _migrate --network "${MIGRATE_NETWORK}" --reset && + yarn _upload ${CONTRACTS_VERSION_HASH} ${CONTRACTS_VERSION_TAG} diff --git a/packages/concordia-contracts/package.json b/packages/concordia-contracts/package.json index 41cbd3a..e348d9c 100644 --- a/packages/concordia-contracts/package.json +++ b/packages/concordia-contracts/package.json @@ -15,7 +15,8 @@ "migrate-upload": "yarn _migrate --network develop && yarn upload", "migrate-reset-upload": "yarn _migrate --network develop --reset && yarn upload", "_migrate": "yarn truffle migrate", - "upload": "node ./utils/contractsProviderUtils.js ${npm_package_version}-dev latest" + "upload": "yarn _upload ${npm_package_version}-dev latest", + "_upload": "node ./utils/contractsProviderUtils.js" }, "dependencies": { "@openzeppelin/contracts": "~3.3.0",