Skip to content

v0.9.0

Latest

Choose a tag to compare

@github-actions github-actions released this 30 Aug 23:03
d0f8677

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_VERSION or 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 suites

Shell:

$ 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.mk supports strftime-compatible timestamp formatting via bmakelib.conf.logged.TIMESTAMP_FORMAT.
  • Portable release archive: Distribution includes standalone bmakelib-<version>-portable.tar.gz and bmakelib-portable.tar.gz release artefacts.
  • Modernised CI/CD: Automated testing, packaging, and release pipelines fully migrated to GitHub Actions.

What's Changed

New Contributors

Full Changelog: v0.8.0...v0.9.0