Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 1.7 KB

File metadata and controls

58 lines (38 loc) · 1.7 KB

Contributing to BASH3 Boilerplate

Please fork this repository, create a branch containing your suggested changes, and submit a pull request based on the main branch of https://github.com/kvz/bash3boilerplate/.

Testing

Run the regular test suite:

yarn test

Run a fast contract-focused subset:

yarn test:fast

Run the Bash 3.2.57 compatibility suite in Docker:

yarn test:bash3:docker

Run all checks used for release confidence:

yarn test:all

CI runs on Linux (ubuntu-latest), macOS (macos-latest, Bash 3.2), and a Docker Bash 3.2.57 lane. The native and Docker lanes are complementary and catch different classes of portability issues.

Coding standards

These rules are CI-enforced for contributions to b3bp itself:

  1. Format with shfmt (shfmt -i 2 -bn): two-space indent, binary operators may start a line. Run yarn fix:shfmt to auto-format.
  2. Do not introduce trailing whitespace on lines.
  3. Use a single equal sign when checking if [[ "${NAME}" = "Kevin" ]].
  4. Use the bash test operator ([[ ... ]]) rather than [ or test.
  5. Use braces around variable expansions: ${VAR}.
  6. Keep ShellCheck clean at warning severity or above.

Releasing

Before running a release command (yarn release:patch, yarn release:minor, yarn release:major):

  1. Ensure you are on main with a clean working tree.
  2. Ensure CI checks for HEAD on main are green.
  3. Update CHANGELOG.md ## main section with completed checklist entries (- [x]) and no remaining open checklist items (- [ ]).

Automated gate:

yarn release:ready

The release script runs this gate automatically before tagging/publishing.