Skip to content

Commit

Permalink
use tmp file to when editing metadata json
Browse files Browse the repository at this point in the history
  • Loading branch information
BenoitRanque committed Oct 15, 2024
1 parent 7ccb2f0 commit 37ac650
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,9 @@ jobs:
# modify metadata file to add new entry
UPDATED_METADATA= jq --arg RELEASE_VERSION "$GITHUB_REF_NAME" '.overview.latest_version = $RELEASE_VERSION' "${ROOT}/ndc-hub/registry/hasura/clickhouse/metadata.json" |
jq --arg RELEASE_VERSION "$GITHUB_REF_NAME" --arg RELEASE_HASH "$RELEASE_HASH" '.source_code.version |= [{tag: $RELEASE_VERSION, hash: $RELEASE_HASH, is_verified: true}] + .'
jq --arg RELEASE_VERSION "$GITHUB_REF_NAME" --arg RELEASE_HASH "$RELEASE_HASH" '.source_code.version |= [{tag: $RELEASE_VERSION, hash: $RELEASE_HASH, is_verified: true}] + .' > metadata.tmp.json
echo "$UPDATED_METADATA" > "${ROOT}/ndc-hub/registry/hasura/clickhouse/metadata.json"
mv metadata.tmp.json "${ROOT}/ndc-hub/registry/hasura/clickhouse/metadata.json"
git add .
git commit -m "Release ClickHouse $GITHUB_REF_NAME"
Expand Down

0 comments on commit 37ac650

Please sign in to comment.