Skip to content

Commit e43f996

Browse files
Merge pull request #96 from jerichokeyne/ocm-20030
OCM-20030 | ci: Adding script to update module version for the examples
2 parents 0199ab6 + c232c85 commit e43f996

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,9 @@ change-ocp-version:
8080
# This target require teraform-docs, follow the installation guide: https://terraform-docs.io/user-guide/installation/
8181
terraform-docs:
8282
bash scripts/terraform-docs.sh
83+
84+
.PHONY: change-module-version
85+
# Example for running: make change-module-version MODULE_VERSION=1.7.0
86+
change-module-version:
87+
find ./examples -type f -name '*.tf' -exec sed -i 's^source\s*= "\.\./\.\./"^source = "terraform-redhat/rosa-hcp/rhcs"\n  version = "${MODULE_VERSION}"^g' -- {} +
88+
find ./examples -type f -name '*.tf' -exec sed -E -i 's^source\s*= "\.\./\.\./modules/([^"]+)"^source = "terraform-redhat/rosa-hcp/rhcs//modules/\1"\n  version = "${MODULE_VERSION}"^g' -- {} +

0 commit comments

Comments
 (0)