Bash-TPL
A Smart, Lightweight shell script templating engine, written in Bash.
Release - v0.5.0
chore: GitHub workflow to run tests against various Bash versions
Added a github worfkflow to execute the bats tests against multiple versions of Bash
I even wrote a blog post about it.
chore: Apply newly reported shellcheck recommendations
I updated shellcheck
at some point after my last release and it started reporting a new error:
- SC2184 - Quote arguments to unset so they're not glob expanded.
Although this SC has been around for a long time, I'm certain that seeing it in my shellcheck report is new.
fix: Track indentation after all statement lines, not just between logical "open"/"close"
I was writing a template with an if/else/fi block and realized that bash-tpl wasn't correctly tracking indentation on the else section.
% # one
1: This text should be indent-tracked
% # two
2: This text should be indent-tracked
% # three
3: This text should be indent-tracked
Previously, section 2 was not being correctly tracked.
I was treating the first encountered statement line as an maybe-open and any subsequent line as a cose, when in fact they should always be seen as a maybe-open and a maybe-close
Breaking Change
Due to the possible changes in leading whitespace in template output, this is considered a breaking change.
fix: Stop ignoring unindented directives in text blocks
There was a real bug that was dropping directive statements when were part of a text block, but did not exist at the same (or deeper) indentation of the text block.
I only discovered this by accident while writing a test for the indentation fix above.
Full ChangeLog
Full Changelog: v0.4.0...v0.5.0