File tree Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- # Exit script as soon as a command fails.
4- set -o errexit
3+ POSITIONAL_ARGS=()
4+
5+ while [[ $# -gt 0 ]]; do
6+ case $1 in
7+ --local)
8+ local=1
9+ shift # past argument
10+ ;;
11+ --no-build)
12+ skip_build=1
13+ shift # past argument
14+ ;;
15+ -* |--* )
16+ echo " Unknown option $1 "
17+ exit 1
18+ ;;
19+ * )
20+ POSITIONAL_ARGS+=(" $1 " ) # save positional arg
21+ shift # past argument
22+ ;;
23+ esac
24+ done
25+
26+ set -- " ${POSITIONAL_ARGS[@]} " # restore positional parameters
527
628echo " ### Release script started..."
29+ if [[ $skip_build -eq 0 ]]; then
730yarn build
31+ fi
832echo " ### Build finished. Copying abis."
933rm -rf contracts/abi
1034mkdir -p contracts/abi
@@ -18,7 +42,11 @@ cp README.md contracts/README.md
1842# publish from contracts folder
1943cd contracts
2044echo " ### Publishing..."
45+ if [[ $local -eq 1 ]]; then
46+ yalc push
47+ else
2148np --any-branch --no-tests
49+ fi
2250# delete copied README
2351rm README.md
2452# back to root folder
You can’t perform that action at this time.
0 commit comments