Skip to content

Commit

Permalink
Merge pull request #260 from TypedDevs/feat/add-latest-version-on-beta
Browse files Browse the repository at this point in the history
Add LATEST_BASHUNIT_VERSION when installing beta
  • Loading branch information
Chemaclass authored Jun 17, 2024
2 parents b7114c4 + c718392 commit 3a7ad09
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [Unreleased](https://github.com/TypedDevs/bashunit/compare/0.12.0...main)

- Allow calling assertions standalone outside tests
- Add the latest version when installing beta
- Add `assert_line_count`

## [0.12.0](https://github.com/TypedDevs/bashunit/compare/0.11.0...0.12.0) - 2024-06-11
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function build_and_install_beta() {
cd ..

local beta_version
beta_version='(non-stable) beta ['"$(date +'%Y-%m-%d')"']'
beta_version='(non-stable) beta after '"$LATEST_BASHUNIT_VERSION"' ['"$(date +'%Y-%m-%d')"']'

sed -i -e 's/BASHUNIT_VERSION=".*"/BASHUNIT_VERSION="'"$beta_version"'"/g' temp_bashunit/bin/bashunit
cp temp_bashunit/bin/bashunit ./
Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/install_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ function test_install_downloads_the_non_stable_beta_version() {
"$(printf "> Downloading non-stable version: 'beta'\n> bashunit has been installed in the 'deps' folder")"\
"$output"
assert_file_exists "$installed_bashunit"
assert_equals\
"$(printf "\e[1m\e[32mbashunit\e[0m - (non-stable) beta [2023-11-13]")"\
assert_matches\
"$(printf "\(non-stable\) beta after ([0-9]+\.[0-9]+\.[0-9]+) \[2023-11-13\]")"\
"$("$installed_bashunit" --env "$TEST_ENV_FILE" --version)"
assert_directory_not_exists "./deps/temp_bashunit"
file_count_of_deps_directory=$(find ./deps -mindepth 1 -maxdepth 1 -print | wc -l | tr -d ' ')
Expand Down

0 comments on commit 3a7ad09

Please sign in to comment.