Skip to content

Commit

Permalink
chore: added a script to fix the incorrect headers key matching rule …
Browse files Browse the repository at this point in the history
…in pact file
  • Loading branch information
Saup21 committed Jun 24, 2024
1 parent 187529e commit eae6902
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ pact: pact-go
go test -tags=consumer -count=1 -v github.com/pactflow/terraform/client/...

publish:
@echo "--- 🤝 Transorming Broken Keys in Pact File"
"$(CURDIR)/scripts/transform-broken-keys.sh"
@echo "--- 🤝 Publishing Pact"
"${PACT_CLI}" publish ${PWD}/client/pacts --consumer-app-version ${GITHUB_SHA} --tag ${GITHUB_BRANCH}

Expand Down
7 changes: 7 additions & 0 deletions scripts/transform-broken-keys.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -e

sed -i -E "s/\$\.header\./\$\.headers\./g" $PWD/client/pacts/terraform-client-pactflow-application-saas.json

echo "Done..."

0 comments on commit eae6902

Please sign in to comment.