Skip to content

Commit d738e4e

Browse files
committed
Fix prepare
1 parent f202315 commit d738e4e

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

bin/release.sh

+18-12
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,31 @@ function exit_help {
1616

1717
function prepare {
1818
CHAIN=$1
19+
}
20+
21+
function publish_0xgraph {
22+
CHAIN=$1
23+
SUBGRAPH=$2
24+
VERSION=$3
25+
DEPLOY_KEY=$4
1926
echo "preparing $CHAIN"
2027
yarn configure $CHAIN
2128
yarn codegen
2229
yarn build
23-
}
24-
25-
function publish_0xgraph {
26-
SUBGRAPH=$1
27-
VERSION=$2
28-
DEPLOY_KEY=$3
2930
echo "publishing $SUBGRAPH to 0xgraph"
3031
yarn run graph deploy $SUBGRAPH --node https://api.0xgraph.xyz/deploy --ipfs https://api.0xgraph.xyz/ipfs --version-label="v$VERSION" --deploy-key=$DEPLOY_KEY
3132
}
3233

3334
function publish_goldsky {
34-
SUBGRAPH=$1
35-
VERSION=$2
36-
DEPLOY_KEY=$3
35+
CHAIN=$1
36+
SUBGRAPH=$2
37+
VERSION=$3
38+
DEPLOY_KEY=$4
39+
echo "preparing $CHAIN"
40+
yarn configure $CHAIN
41+
yarn codegen
42+
yarn build
43+
3744
echo "publishing $SUBGRAPH to goldsky"
3845
goldsky subgraph deploy $SUBGRAPH/$VERSION --path . --token $DEPLOY_KEY
3946

@@ -49,10 +56,10 @@ function publish {
4956
SUBGRAPH=
5057
case $PROVIDER in
5158
"0xgraph")
52-
publish_0xgraph beefyfinance/balances-$CHAIN $VERSION $DEPLOY_KEY
59+
publish_0xgraph $CHAIN beefyfinance/balances-$CHAIN $VERSION $DEPLOY_KEY
5360
;;
5461
"goldsky")
55-
publish_goldsky beefy-balances-$CHAIN $VERSION $DEPLOY_KEY
62+
publish_goldsky $CHAIN beefy-balances-$CHAIN $VERSION $DEPLOY_KEY
5663
;;
5764
esac
5865
}
@@ -95,5 +102,4 @@ if [ -z "$deploy_key" ]; then
95102
exit_help
96103
fi
97104

98-
prepare $chain
99105
publish $version $chain $provider $deploy_key

0 commit comments

Comments
 (0)