Skip to content

Commit

Permalink
fix: opentofu customization detection logic (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonZeolla authored Aug 11, 2024
1 parent 72c00ca commit 1d552c2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ elif [ "$#" -eq 0 ]; then
echo -e "terraform\t ${TERRAFORM_VERSION}"
fi
elif [ -x "$(which tofu)" ]; then
current_version=$(cat /home/easy_infra/.tofuenv/version)
current_version=v$(cat /home/easy_infra/.tofuenv/version)
if [[ "${OPENTOFU_VERSION}" != "${current_version}" ]]; then
echo -e "tofu\t ${OPENTOFU_VERSION} (customized)"
else
Expand Down
2 changes: 1 addition & 1 deletion build/hooks/40-set_default_opentofu_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
source /usr/local/bin/common.sh


current_version=$(cat /home/easy_infra/.tofuenv/version)
current_version=v$(cat /home/easy_infra/.tofuenv/version)
output_log="/var/log/$(basename "${BASH_SOURCE[0]%%.sh}.log")"

if [[ -z "${OPENTOFU_VERSION}" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion build/hooks/50-opentofu_dynamic_version_use.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [[ "${AUTODETECT}" != "true" ]]; then
exit 0
fi

current_version=$(cat /home/easy_infra/.tofuenv/version)
current_version=v$(cat /home/easy_infra/.tofuenv/version)

# Use tofuenv to get the minimum version of opentofu specified in the opentofu code (in the current directory)
opentofu_min_required="$(tofuenv min-required 2>>"${output_log}")"
Expand Down
2 changes: 1 addition & 1 deletion easy_infra/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"""

__maintainer__ = "Seiso"
__copyright__ = "(c) 2022 Seiso, LLC"
__copyright__ = "(c) 2020-2024 Seiso, LLC"
__project_name__ = "easy_infra"
__version__ = "2024.08.01"

0 comments on commit 1d552c2

Please sign in to comment.