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

Deal with terraform alpha versions #94

Merged
merged 2 commits into from
Feb 8, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion libexec/tfenv-list-remote
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ if [ ${#} -ne 0 ];then
exit 1
fi

curlw -sf https://releases.hashicorp.com/terraform/ | grep -o -E "[0-9]+\.[0-9]+\.[0-9]+(-(rc|beta)[0-9]+)?" | uniq
curlw -sf https://releases.hashicorp.com/terraform/ | grep -o -E "[0-9]+\.[0-9]+\.[0-9]+(-(rc|beta|alpha)[0-9]+)?" | uniq
11 changes: 6 additions & 5 deletions test/test_use_minrequired.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,23 @@ source $(dirname $0)/helpers.sh \
echo "### Install not min-required version"
cleanup || error_and_die "Cleanup failed?!"

v=0.2.0
v=0.8.8
minv=0.8.0
(
tfenv install ${v} || true
tfenv use ${v} || exit 1
check_version ${v} || exit 1
) || error_and_proceed "Installing specific version ${v}"

echo 'terraform {
echo "terraform {

required_version = ">=0.1.0"
}' >> min_required.tf
required_version = \">=${minv}\"
}" >> min_required.tf

tfenv install min-required
tfenv use min-required

check_version '0.1.0' || error_and_proceed "Min required version doesn't match"
check_version "${minv}" || error_and_proceed "Min required version doesn't match"

cleanup || error_and_die "Cleanup failed?!"

Expand Down