Skip to content

Commit

Permalink
Merge pull request #39 from tofuutils/feat/changelog
Browse files Browse the repository at this point in the history
Auto CHANGELOG.md preparation
  • Loading branch information
Nmishin authored Jan 10, 2024
2 parents 942a2b5 + 63087aa commit 789047a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
## 1.0.3
## 1.1.0 (Unreleased)

## 1.0.3 (January 4th, 2024)
2 changes: 1 addition & 1 deletion libexec/tofuenv---version
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ done;
#####################

log 'debug' 'Scraping tofuenv version from CHANGELOG.md';
version="$(awk '/^##/{ print $2; exit}' "${TOFUENV_ROOT}/CHANGELOG.md")" \
version="$(awk 'FNR>1 && /^##/{ print $2; exit}' "${TOFUENV_ROOT}/CHANGELOG.md")" \
&& log 'debug' "Found version '${version}' in CHANGELOG.md" \
|| log 'error' 'Failed to scrape version from CHANGELOG.md';

Expand Down
2 changes: 1 addition & 1 deletion test/test_install_and_use.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ tests__kv=(
"$(tofuenv list-remote | grep 'beta' | head -n 1),latest:beta"
"$(tofuenv list-remote | grep 'rc' | head -n 1),latest:rc"
"$(tofuenv list-remote | grep '^1\.6\.' | head -n 1),latest:^1.6."
'1.6.0-rc1,latest:^1\.6'
'1.6.0,latest:^1\.6'
'1.6.0-alpha5'
'1.6.0-rc1,v1.6.0-rc1'
);
Expand Down
10 changes: 5 additions & 5 deletions test/test_use_latestallowed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ cleanup || log 'error' 'Cleanup failed?!';
log 'info' '### Install latest-allowed normal version (#.#.#)';

echo "terraform {
required_version = \"~> 1.6.0-rc1\"
required_version = \"~> 1.6.0\"
}" > latest_allowed.tf;

(
tofuenv install latest-allowed;
tofuenv use latest-allowed;
check_active_version 1.6.0-rc1;
check_active_version 1.6.0;
) || error_and_proceed 'Latest allowed version does not match';

cleanup || log 'error' 'Cleanup failed?!';
Expand Down Expand Up @@ -92,7 +92,7 @@ echo "terraform {
(
tofuenv install latest-allowed;
tofuenv use latest-allowed;
check_active_version 1.6.0-rc1;
check_active_version 1.6.0;
) || error_and_proceed 'Latest allowed incomplete-version does not match';

cleanup || log 'error' 'Cleanup failed?!';
Expand All @@ -107,7 +107,7 @@ echo 'latest-allowed' > .opentofu-version;

(
TOFUENV_AUTO_INSTALL=true tofu version;
check_active_version 1.6.0-rc1;
check_active_version 1.6.0;
) || error_and_proceed 'Latest allowed auto-installed version does not match';

cleanup || log 'error' 'Cleanup failed?!';
Expand All @@ -123,7 +123,7 @@ echo 'latest-allowed' > chdir-dir/.opentofu-version

(
TOFUENV_AUTO_INSTALL=true tofu -chdir=chdir-dir version;
check_active_version 1.6.0-rc1 chdir-dir;
check_active_version 1.6.0 chdir-dir;
) || error_and_proceed 'Latest allowed version from -chdir does not match';

cleanup || log 'error' 'Cleanup failed?!';
Expand Down

0 comments on commit 789047a

Please sign in to comment.