Skip to content

Commit

Permalink
chore: fix deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
facuspagnuolo committed Jun 14, 2024
1 parent 26def92 commit f49289f
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 282 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@mimic-fi/v3-tasks": "0.2.0"
},
"devDependencies": {
"@graphprotocol/graph-cli": "^0.54.0",
"@graphprotocol/graph-cli": "^0.74.1",
"@graphprotocol/graph-ts": "^0.31.0",
"@typescript-eslint/eslint-plugin": "^4.1.1",
"@typescript-eslint/parser": "^4.1.1",
Expand Down
33 changes: 14 additions & 19 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,23 @@ set -o errexit
# Run graph build
yarn build:$NETWORK

# Load platform
if [[ "$NETWORK" = "aurora" || "$NETWORK" = "bsc" ]]; then
yarn graph deploy mimic-fi/v3-$NETWORK --product hosted-service --deploy-key $GRAPH_KEY
else
# Check deployment version
if [[ -z $VERSION_LABEL ]]; then
echo 'Please make sure a version label is provided'
exit 1
fi

# Define subgraph name
if [[ "$NETWORK" = "base" || "$NETWORK" = "zkevm" ]]; then
NAME=mimic-v3-$NETWORK
else
NAME=v3-$NETWORK
fi
# Check deployment version
if [[ -z $VERSION_LABEL ]]; then
echo 'Please make sure a version label is provided'
exit 1
fi

# Deploy subgraph
echo "Deploying $NAME to subgraph studio"
yarn graph deploy mimic-v3-$NETWORK --studio --deploy-key $GRAPH_KEY -l $VERSION_LABEL
# Define subgraph name
if [[ "$NETWORK" = "base" || "$NETWORK" = "zkevm" ]]; then
NAME=mimic-v3-$NETWORK
else
NAME=v3-$NETWORK
fi

# Deploy subgraph
echo "Deploying $NAME to subgraph studio"
yarn graph deploy $NAME --studio --deploy-key $GRAPH_KEY -l $VERSION_LABEL

# Check deployer status
if [ $? -ne 0 ]; then
echo "Error trying to deploy subgraph with exit status $?"
Expand Down
Loading

0 comments on commit f49289f

Please sign in to comment.