Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: opentofu customization detection logic #332

Merged
merged 2 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"