This release brings two key features: zero-install project bootstrapping and self-documenting Makefiles.
2. Highlights
Zero-Install Project Bootstrapping
You no longer need root privileges, package managers, or pre-installed system dependencies to use bmakelib. Simply drop this bootstrap snippet directly into any Makefile to automatically download, unpack, and cache bmakelib. locally on first execution:
###################### bmakelib: download, install and include.
-include $(or $(BMAKELIB_DIR),$(PWD)/.bmakelib)/bmakelib.mk
$(or $(BMAKELIB_DIR),$(PWD)/.bmakelib)/bmakelib.mk:
@mkdir -p $(@D)
@curl -fsSL https://github.com/bahmanm/bmakelib/releases/$(if $(BMAKELIB_VERSION),download/$(BMAKELIB_VERSION),latest/download)/bmakelib-portable.tar.gz \
| tar -xz -C $(@D) --strip-components=3
###################### bmakelib: done
# Your own Make stuff....
build: bmakelib.error-if-blank( ENVIRONMENT ) ## Build application artefacts
build:
@echo "Building for $(ENVIRONMENT)..."- Zero installation: Downloads and caches in
./.bmakelib/on demand. - Version pinning: Pin releases effortlessly using
BMAKELIB_VERSIONor track latest automatically. - CI/CD friendly: Works identically on developer machines, ephemeral Docker containers, and CI runners.
Self-Documenting Makefiles (bmakelib.help)
Effortlessly generate formatted, grouped help screens directly in the terminal using docstring comments (##, ##@, ##?):
Makefile:
include bmakelib/bmakelib.mk
##@ Build & Packaging
build: ## Compile and package all build artefacts
PREFIX ?= /usr ## Base installation prefix directory
##@ Verification
test: ## Execute all test suitesShell:
$ make help
================================================================================
Build & Packaging
================================================================================
TARGETS
build Compile and package all build artefacts
VARIABLES
PREFIX Base installation prefix directory
================================================================================
Verification
================================================================================
TARGETS
test Execute all test suites
Other Highlights
- Environment variable configuration fallbacks: All modules now support overriding configuration via
BMAKELIB_CONF_*environment variables when explicit Makefile variables are omitted. - Configurable timestamp formats:
logged.mksupportsstrftime-compatible timestamp formatting viabmakelib.conf.logged.TIMESTAMP_FORMAT. - Portable release archive: Distribution includes standalone
bmakelib-<version>-portable.tar.gzandbmakelib-portable.tar.gzrelease artefacts. - Modernised CI/CD: Automated testing, packaging, and release pipelines fully migrated to GitHub Actions.
What's Changed
- Update ubuntu Docker tag to v26 by @renovate[bot] in #113
- [#117] Implement a strftime-compatible timestamp format for logged by @bahmanm in #119
- [#120] Switch to GitHub Actions by @bahmanm in #122
- [#118] Improve dict documentation by @bahmanm in #126
- [#116] Use a variable instead of hard-coded ROOT by @bahmanm in #127
- Bump actions/checkout from 4 to 7 in the actions-major group by @dependabot[bot] in #123
- [#128] Environment variables as fallback for config by @bahmanm in #129
- [#81] Self-documenting Makefiles by @bahmanm in #130
- [#132] Portable release archive by @bahmanm in #133
- [#134] Configurable maintainer for DEB by @bahmanm in #135
- [#134] Fix a typo in the changelog by @bahmanm in #136
- [#137] Use VERSION as a release artefact by @bahmanm in #138
- [#137] Pass VERSION to Docker by @bahmanm in #139
- [#131] Simplify the README with a bootstrap snippet by @bahmanm in #140
New Contributors
- @renovate[bot] made their first contribution in #113
- @dependabot[bot] made their first contribution in #123
Full Changelog: v0.8.0...v0.9.0