From a47ad1076f00beafbc318a037bb60cce1037b7b7 Mon Sep 17 00:00:00 2001 From: mmd-afegbua Date: Tue, 18 Jun 2024 10:22:42 +0100 Subject: [PATCH] goldsky versioning --- packages/subgraph/tasks/deploy.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/subgraph/tasks/deploy.sh b/packages/subgraph/tasks/deploy.sh index c6011dd757..140ffdcf5f 100755 --- a/packages/subgraph/tasks/deploy.sh +++ b/packages/subgraph/tasks/deploy.sh @@ -126,7 +126,11 @@ deploy_to_goldsky() { local network="$1" # TODO: use tagging? - local subgraphName="protocol-$DEPLOYMENT_ENV-$network/1.0.0" + #Get subgraph version from package.json + PACKAGE_JSON_PATH="package.json" + VERSION_LABEL=$($JQ -r '.version' $PACKAGE_JSON_PATH) + + local subgraphName="protocol-$DEPLOYMENT_ENV-$network/$VERSION_LABEL" # Note: when using Graph CLI to deploy, it implicitly triggers build too, but Goldsky CLI doesn't, so we do it explicitly. $GRAPH_CLI build