Skip to content

Commit

Permalink
Merge pull request #3 from opentofuutils/feat/rename-tfenv-to-tofuenv
Browse files Browse the repository at this point in the history
feat: rename tfenv to tofuenv
  • Loading branch information
Nmishin authored Dec 26, 2023
2 parents f9e302f + 9dd2e98 commit 26e6f76
Show file tree
Hide file tree
Showing 15 changed files with 285 additions and 253 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ jobs:
with:
context: .
load: true
tags: "tfenv-terraform:${{ github.sha }}"
tags: "tofuenv-terraform:${{ github.sha }}"
- name: 'Check Dockerfile'
if: contains(matrix.os, 'ubuntu')
run: |
expect=1.2.3;
got="$(docker run -e "TFENV_TERRAFORM_VERSION=${expect}" "tfenv-terraform:${{ github.sha }}" version)";
got="$(docker run -e "TOFUENV_TERRAFORM_VERSION=${expect}" "tofuenv-terraform:${{ github.sha }}" version)";
echo "${got}" | tee /dev/stderr | grep -e 'Terraform v1.2.3'
# When we push to master, test everything in order to guarantee releases
Expand Down Expand Up @@ -78,10 +78,10 @@ jobs:
with:
context: .
load: true
tags: 'tfenv-terraform:latest'
tags: 'tofuenv-terraform:latest'
- name: 'Check Dockerfile'
if: contains(matrix.os, 'ubuntu')
run: |
expect=1.2.3;
got="$(docker run -e "TFENV_TERRAFORM_VERSION=${expect}" tfenv-terraform:latest version)";
got="$(docker run -e "TOFUENV_TERRAFORM_VERSION=${expect}" tofuenv-terraform:latest version)";
echo "${got}" | tee /dev/stderr | grep -e 'Terraform v1.2.3'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ bin/terraform-*
/use-gnupg
/use-gpgv
.*.swp
.idea
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/tofuenv.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ RUN apk add --no-cache --purge \
curl \
;

ARG TFENV_VERSION=3.0.0
RUN wget -O /tmp/tfenv.tar.gz "https://github.com/tfutils/tfenv/archive/refs/tags/v${TFENV_VERSION}.tar.gz" \
&& tar -C /tmp -xf /tmp/tfenv.tar.gz \
&& mv "/tmp/tfenv-${TFENV_VERSION}/bin"/* /usr/local/bin/ \
&& mkdir -p /usr/local/lib/tfenv \
&& mv "/tmp/tfenv-${TFENV_VERSION}/lib" /usr/local/lib/tfenv/ \
&& mv "/tmp/tfenv-${TFENV_VERSION}/libexec" /usr/local/lib/tfenv/ \
ARG TOFUENV_VERSION=3.0.0
RUN wget -O /tmp/tofuenv.tar.gz "https://github.com/tfutils/tofuenv/archive/refs/tags/v${TOFUENV_VERSION}.tar.gz" \
&& tar -C /tmp -xf /tmp/tofuenv.tar.gz \
&& mv "/tmp/tofuenv-${TOFUENV_VERSION}/bin"/* /usr/local/bin/ \
&& mkdir -p /usr/local/lib/tofuenv \
&& mv "/tmp/tofuenv-${TOFUENV_VERSION}/lib" /usr/local/lib/tofuenv/ \
&& mv "/tmp/tofuenv-${TOFUENV_VERSION}/libexec" /usr/local/lib/tofuenv/ \
&& mkdir -p /usr/local/share/licenses \
&& mv "/tmp/tfenv-${TFENV_VERSION}/LICENSE" /usr/local/share/licenses/tfenv \
&& rm -rf /tmp/tfenv* \
&& mv "/tmp/tofuenv-${TOFUENV_VERSION}/LICENSE" /usr/local/share/licenses/tofuenv \
&& rm -rf /tmp/tofuenv* \
;
ENV TFENV_ROOT /usr/local/lib/tfenv
ENV TOFUENV_ROOT /usr/local/lib/tofuenv

ENV TFENV_CONFIG_DIR /var/tfenv
VOLUME /var/tfenv
ENV TOFUENV_CONFIG_DIR /var/tofuenv
VOLUME /var/tofuenv

# Default to latest; user-specifiable
ENV TFENV_TERRAFORM_VERSION latest
ENV TOFUENV_TERRAFORM_VERSION latest
ENTRYPOINT ["/usr/local/bin/terraform"]
Loading

0 comments on commit 26e6f76

Please sign in to comment.