diff --git a/CHANGELOG.md b/CHANGELOG.md index 91b34362..7abf3c78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog -## [Unreleased](https://github.com/TypedDevs/bashunit/compare/0.13.0...main) +## [Unreleased](https://github.com/TypedDevs/bashunit/compare/0.14.0...main) + +- Nothing yet... + +## [0.14.0](https://github.com/TypedDevs/bashunit/compare/0.13.0...0.14.0) - 2024-07-14 - Fix echo does not break test execution results - Add bashunit facade to enable custom assertions @@ -8,7 +12,7 @@ - Generate checksum on build - Enable display execution time on macOS with `SHOW_EXECUTION_TIME` - Support for displaying the clock without `perl` (for non-macOS) -- Enable strictmode +- Enable strict mode - Add `-l|--log-junit ` option - Add `-r|--report-html ` option - Add `--debug` option diff --git a/bashunit b/bashunit index 488487cf..d8c4e205 100755 --- a/bashunit +++ b/bashunit @@ -2,7 +2,7 @@ set -euo pipefail # shellcheck disable=SC2034 -declare -r BASHUNIT_VERSION="0.13.0" +declare -r BASHUNIT_VERSION="0.14.0" # shellcheck disable=SC2155 declare -r BASHUNIT_ROOT_DIR="$(dirname "${BASH_SOURCE[0]}")" diff --git a/docs/blog/2024-07-14-release-0-14.md b/docs/blog/2024-07-14-release-0-14.md new file mode 100644 index 00000000..8d796756 --- /dev/null +++ b/docs/blog/2024-07-14-release-0-14.md @@ -0,0 +1,96 @@ +--- +date: '2024-07-14' +title: 'Release 0.14' +description: 'Adding features such as HTML report, logger (JUnit XML), strict mode, SHA-256 checksum validation, custom asserts, and other improvements.' +coverUrl: '/covers/2024-07-14-release-0-14.png' +coverAlt: 'bashunit integrated into PHPStan' + +aside: false +--- + +# {{ $frontmatter.title }} + + + +## 🐛 Bug fixes + +- Fixed `SHOW_EXECUTION_TIME` on macOS [#282](https://github.com/TypedDevs/bashunit/pull/282) +- Fix `echo` breaks test execution results [#275](https://github.com/TypedDevs/bashunit/pull/275) + +## 🏗️ New features + +### Logger (JUnit XML) + +- Docs: Command line: Logging +- PR: [#279](https://github.com/TypedDevs/bashunit/pull/279) + +`./bashunit -l|--log-junit ` + +Create a report XML file that follows the JUnit XML format and contains information about the test results of your bashunit tests. + + + +### Report HTML + +- Docs: Command line: Report +- PR: [#281](https://github.com/TypedDevs/bashunit/pull/281) + +`./bashunit -r|--report-html ` + +Create a report HTML file that contains information about the test results of your bashunit tests. + + + +### Debug mode + +- Docs: Command line: Debug +- PR: [#290](https://github.com/TypedDevs/bashunit/pull/290) + +`./bashunit --debug` + +Enables a shell mode in which all executed commands are printed to the terminal. Printing every command as executed may help you visualize the script's control flow if it is not working as expected. + + + +### Custom asserts + +- Docs: Custom asserts +- PR: [#276](https://github.com/TypedDevs/bashunit/pull/276) + +You can extend the language by building your custom assertions. It is ideal for custom domain assertions, which don't need to be in the core library. + +```bash [Example] +# Your custom assert using the bashunit facade +function assert_foo() { + local actual="$1" + + if [[ "foo" != "$actual" ]]; then + bashunit::assertion_failed "foo" "$actual" + return + fi + + bashunit::assertion_passed +} + +# Your test using your custom assert +function test_assert_foo_passed() { + assert_foo "foo" +} +``` + +### Checksum validation + +- Docs: Installation: Verify +- PR: [#278](https://github.com/TypedDevs/bashunit/pull/278) [#287](https://github.com/TypedDevs/bashunit/pull/287) + +Security is an important aspect of FOSS. Therefore, we will help ensure that there is an easy way to validate the executable for each official release by publishing the SHA-256 hash in a file and on the GitHub release page. + +## 🌾 Miscellaneous + +- Enable strict mode [#239](https://github.com/TypedDevs/bashunit/pull/239) [#241](https://github.com/TypedDevs/bashunit/pull/241) [#285](https://github.com/TypedDevs/bashunit/pull/285) +- Add `dump` and `dd` functions for local development debugging [#286](https://github.com/TypedDevs/bashunit/pull/286) +- Improve build [#289](https://github.com/TypedDevs/bashunit/pull/289) + +--- + +See the full changelog in GitHub diff --git a/docs/public/covers/2024-07-14-release-0-14.png b/docs/public/covers/2024-07-14-release-0-14.png new file mode 100644 index 00000000..056941f3 Binary files /dev/null and b/docs/public/covers/2024-07-14-release-0-14.png differ diff --git a/docs/public/imgs/2024-07-14/debug-demo.png b/docs/public/imgs/2024-07-14/debug-demo.png new file mode 100644 index 00000000..81a3972e Binary files /dev/null and b/docs/public/imgs/2024-07-14/debug-demo.png differ diff --git a/docs/public/imgs/2024-07-14/log-junit-demo.png b/docs/public/imgs/2024-07-14/log-junit-demo.png new file mode 100644 index 00000000..b2e168d5 Binary files /dev/null and b/docs/public/imgs/2024-07-14/log-junit-demo.png differ diff --git a/docs/public/imgs/2024-07-14/report-html-demo.png b/docs/public/imgs/2024-07-14/report-html-demo.png new file mode 100644 index 00000000..77e982da Binary files /dev/null and b/docs/public/imgs/2024-07-14/report-html-demo.png differ diff --git a/package.json b/package.json index c26cae7a..723b8f17 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bashunit-docs", - "version": "0.13.0", - "checksum": "6d9f1b49e4cf61d9837277251cce566eaa8b73e0f417474949a48336bd43a901", + "version": "0.14.0", + "checksum": "84822a2f2d3a84646abad5fe26e6d49a952c6e5ea08e3752443d583346cc4d56", "description": "Docs for bashunit a simple testing library for bash scripts", "main": "index.js", "repository": "git@github.com:TypedDevs/bashunit.git",