Skip to content

Commit

Permalink
updated get_version grep
Browse files Browse the repository at this point in the history
  • Loading branch information
ShahanaBaliyambra committed Dec 19, 2024
1 parent 54a4cf5 commit e87b54d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ jobs:
- name: Get version from templates
id: get_version
run: |
version=$(grep -E 'template_version.*=.*"' templates/Resource_Manager_Template/outputs.tf | sed -E 's/.*"([^"])".*/\1/')
echo "Searching for template_version in outputs.tf..."
grep_result=$(grep -E 'output "template_version"' -A2 templates/Resource_Manager_Template/outputs.tf)
echo "Grep result:"
echo "$grep_result"
version=$(echo "$grep_result" | grep 'value' | sed -E 's/.*"(v[0-9]+\.[0-9]+\.[0-9]+)".*/\1/')
echo "Extracted version: $version"
if [ -z "$version" ]; then
echo "Error: template_version not found in outputs.tf" >&2
exit 1
Expand Down

0 comments on commit e87b54d

Please sign in to comment.