Skip to content

Commit

Permalink
Merge pull request #33 from jcolfej/master
Browse files Browse the repository at this point in the history
Fix Terraform versions parsing
  • Loading branch information
cytopia authored Jun 10, 2022
2 parents dde66de + 75b03a2 commit 9ed05ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ RUN set -eux \
&& if [ "${TF_VERSION}" = "latest" ]; then \
VERSION="$( curl -sS https://releases.hashicorp.com/terraform/ \
| tac | tac \
| grep -Eo '/[.0-9]+/' \
| grep -Eo '/terraform/[.0-9]+\"' \
| grep -Eo '[.0-9]+' \
| sort -V \
| tail -1 )"; \
else \
VERSION="$( curl -sS https://releases.hashicorp.com/terraform/ \
| tac | tac \
| grep -Eo "/${TF_VERSION}\.[.0-9]+/" \
| grep -Eo "/terraform/${TF_VERSION}\.[.0-9]+\"" \
| grep -Eo '[.0-9]+' \
| sort -V \
| tail -1 )"; \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ _test-tf-version:
LATEST="$$( \
curl -L -sS https://releases.hashicorp.com/terraform/ \
| tac | tac \
| grep -Eo '/[.0-9]+/' \
| grep -Eo '/terraform/[.0-9]+\"' \
| grep -Eo '[.0-9]+' \
| sort -u \
| sort -V \
Expand Down

0 comments on commit 9ed05ea

Please sign in to comment.