Skip to content

Commit

Permalink
make deploy_release_contracts run in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
alecps committed Mar 9, 2021
1 parent ccec068 commit d39689f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ jobs:
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
echo "Comparing against $RELEASE_TAG"
yarn --cwd packages/protocol test:generate-old-devchain-and-build -b $RELEASE_TAG -d .tmp/released_chain -l /dev/stdout
yarn --cwd packages/protocol test:generate-old-devchain-and-build -b $RELEASE_TAG -d .tmp/released_chain -l /dev/stdout -g scripts/truffle/releaseGoldExampleConfigs.json
- persist_to_workspace:
root: .
paths:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ NETWORK=""
FORNO=""
BUILD_DIR=""
LOG_FILE="/dev/null"
GRANTS_FILE=""

while getopts ':b:rl:d:' flag; do
while getopts ':b:rl:d:g:' flag; do
case "${flag}" in
b) BRANCH="${OPTARG}" ;;
l) LOG_FILE="${OPTARG}" ;;
d) BUILD_DIR="${OPTARG}" ;;
g) GRANTS_FILE="${OPTARG}";;
*) error "Unexpected option ${flag}" ;;
esac
done
Expand All @@ -38,7 +40,11 @@ yarn build >> $LOG_FILE

# TODO: Move to yarn build:sol after the next contract release.
echo "- Create local network"
yarn devchain generate-tar "$PWD/devchain.tar.gz" >> $LOG_FILE
if $GRANTS_FILE != ""; then
yarn devchain generate-tar "$PWD/devchain.tar.gz" --release_gold_contracts $GRANTS_FILE >> $LOG_FILE
else
yarn devchain generate-tar "$PWD/devchain.tar.gz" >> $LOG_FILE
fi
rm -rf $BUILD_DIR && mkdir -p $BUILD_DIR
mv build/contracts $BUILD_DIR
mv "$PWD/devchain.tar.gz" $BUILD_DIR/.
2 changes: 1 addition & 1 deletion packages/protocol/scripts/devchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ yargs
})
.option('release_gold_contracts', {
type: 'string',
description: 'JSON list of release gold contracts',
description: 'Path to JSON containing list of release gold contracts',
}),
(args) =>
exitOnError(
Expand Down

0 comments on commit d39689f

Please sign in to comment.