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 1
1
#! /usr/bin/env bash
2
2
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
5
27
6
28
echo " ### Release script started..."
29
+ if [[ $skip_build -eq 0 ]]; then
7
30
yarn build
31
+ fi
8
32
echo " ### Build finished. Copying abis."
9
33
rm -rf contracts/abi
10
34
mkdir -p contracts/abi
@@ -18,7 +42,11 @@ cp README.md contracts/README.md
18
42
# publish from contracts folder
19
43
cd contracts
20
44
echo " ### Publishing..."
45
+ if [[ $local -eq 1 ]]; then
46
+ yalc push
47
+ else
21
48
np --any-branch --no-tests
49
+ fi
22
50
# delete copied README
23
51
rm README.md
24
52
# back to root folder
You can’t perform that action at this time.
0 commit comments