Skip to content

Commit

Permalink
Fix make-release args (#5347)
Browse files Browse the repository at this point in the history
### Description

- Pass `--dry_run` arg
- Fix `build_directory` arg

### Tested

Not tested
  • Loading branch information
nambrot authored Oct 16, 2020
1 parent 65ef385 commit baa87a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/docs/community/release-process/smart-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ This should be used in tandem with `verify-deployed -b $PREVIOUS_RELEASE -n $NET

### Deploy New Contracts

Use the following script to build a candidate release and, using the corresponding backwards compatibility report, deploy **changed** contracts to the specified network.
Use the following script to build a candidate release and, using the corresponding backwards compatibility report, deploy **changed** contracts to the specified network. (Use `-d` to dry-run the deploy).
STORAGE updates are adopted by deploying a new proxy/implementation pair. These new contracts may need to be initialized, for which values can be provided. Outputs a JSON contract upgrade governance proposal.

```bash
Expand Down
7 changes: 5 additions & 2 deletions packages/protocol/scripts/bash/make-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,23 @@ set -euo pipefail
# -p: Path that the governance proposal should be written to.
# -i: Path to the data needed to initialize contracts.
# -r: Path to the contract compatibility report.
# -d: Whether to dry-run this deploy

NETWORK=""
PROPOSAL=""
BRANCH=""
INITIALIZE_DATA=""
REPORT=""
DRYRUN=""

while getopts 'a:b:n:p:i:r:' flag; do
while getopts 'a:b:n:p:i:r:d' flag; do
case "${flag}" in
b) BRANCH="${OPTARG}" ;;
n) NETWORK="${OPTARG}" ;;
p) PROPOSAL="${OPTARG}" ;;
i) INITIALIZE_DATA="${OPTARG}" ;;
r) REPORT="${OPTARG}" ;;
d) DRYRUN="--dry_run"
*) error "Unexpected option ${flag}" ;;
esac
done
Expand All @@ -42,4 +45,4 @@ yarn build
rm -rf $BUILD_DIR && mkdir -p $BUILD_DIR
mv build/contracts $BUILD_DIR

yarn run truffle exec ./scripts/truffle/make-release.js --network $NETWORK --build_artifacts $BUILD_DIR/contracts --report $REPORT --proposal $PROPOSAL --initialize_data $INITIALIZE_DATA
yarn run truffle exec ./scripts/truffle/make-release.js --network $NETWORK --build_directory $BUILD_DIR/contracts --report $REPORT --proposal $PROPOSAL --initialize_data $INITIALIZE_DATA $DRYRUN

0 comments on commit baa87a0

Please sign in to comment.