Skip to content

Releases: bahmanm/bmakelib

v0.7.0

07 Feb 05:59
Compare
Choose a tag to compare

The highlight is the introduction of fail-fast alternative to $(shell) which relieves you from checking .SHELLSTATUS every time $(shell) is used.

Makefile:

VAR1 := $(call bmakelib.shell.error-if-nonzero, echo This fails hard❗ && false)

some-target :
	@echo Must not reach here!

Shell:

$ make some-target
*** bmakelib.shell.error-if-nonzero: Command exited with non-zero value 1.  Stop

What's Changed

New Contributors

Full Changelog: v0.6.0...v0.7.0

v0.6.0

26 Nov 12:09
b4fe503
Compare
Choose a tag to compare

The highlight of this release is the introduction of enums (aka variants or options) which can be used to limit and validate a variable's value.

For example:

Makefile:

define-enum : bmakelib.enum.define( DEPLOY-ENV/development,staging,production )
include define-enum

deploy : bmakelib.enum.error-unless-member( DEPLOY-ENV,ENV )
deploy :
	@echo 🚀 Deploying to $(ENV)...

Shell:

$ make ENV=local-laptop deploy
*** 'local-laptop' is not a member of enum 'DEPLOY-ENV'.  Stop.

$ make ENV=production deploy
🚀 Deploying to production...

What's Changed

  • Support enums (aka variants or options) by @bahmanm in #88
  • Minor edits to docs to make them more readable/easier to understand by @bahmanm in #89
  • Bump version to 0.6.0 by @bahmanm in #90
  • Update RPM spec to include enum.m[kd] by @bahmanm in #91

Full Changelog: v0.4.6...v0.6.0

v0.4.6

10 Nov 02:48
a05c415
Compare
Choose a tag to compare

Mainly a bugfix release which addresses #85 (default-if-blank not overriding the values passed as blank on the command line).

Additionally, there were plenty of changes to the pipeline and how releases are automatically built by Travis.

What's Changed

Full Changelog: v0.4.5...v0.4.6

v0.4.5

23 Aug 14:45
5a70b9d
Compare
Choose a tag to compare

What's New

There are NO functional changes in this release.

How To Use

Please refer to the installation instructions to get started.

What's Changed

Full Changelog: v0.4.4...v0.4.5

v0.4.4

22 Aug 20:38
a480ae5
Compare
Choose a tag to compare

What's New

There are NO functional changes in this release.

How To Use

Please refer to the installation instructions to get started.

What's Changed

Full Changelog: v0.4.3...v0.4.4

v0.4.3

22 Aug 12:27
bb51a83
Compare
Choose a tag to compare

What's New

There are NO functional changes in this release.

How To Use

Please refer to the installation instructions to get started.

What's Changed

Full Changelog: v0.4.2...v0.4.3

v0.4.2

20 Aug 14:48
1310b76
Compare
Choose a tag to compare

What's New

There are NO functional changes in this release.

How To Use

Please refer to the installation instructions to get started.

CHANGELOG

Full Changelog: v0.4.1...v0.4.2

v0.4.1

19 Aug 14:59
ebe13f2
Compare
Choose a tag to compare

What's New

There are NO functional changes in this release.

How To Use

Please refer to the installation instructions to get started.

CHANGELOG

  • Add tests for chained !!logged and !timed prereqs by @bahmanm in #32
  • Assert against a more flexible path to make by @bahmanm in #34
  • Release 0.4.1 by @bahmanm in #35

Full Changelog: v0.4.0...v0.4.1

v0.4.0

16 Aug 10:38
01a37e8
Compare
Choose a tag to compare

First Release Ever 🥳

An example is worth a thousand words:

Makefile:

include bmakelib/bmakelib.mk

my-target : bmakelib.error-if-blank( VAR1 )
my-target : bmakelib.default-if-blank ( VAR2, some-value )
my-target :
	@echo Running $(@)...
	@echo VAR1=$(VAR1), VAR2=$(VAR2)
	@sleep 2
	@echo $(@) is done.

Shell:

$ make VAR1=100 my-target!timed
Using default value 'some-value' for variable 'VAR2'
Using default value 'yes' for variable 'stdlib.conf.timed.SILENT'
Running my-target...
VAR1=100, VAR2=some-value
my-target is done
Target 'my-target' took 2009ms to complete.

What's New

Everything! 😄

In short, there are 4 features shipped with this release:

  • error-if-blank: to declare required variables and fail if they are empty
  • default-if-blank: to declare optional variables with default value
  • timed: to measure the execution time of a given target
  • logged: to log the output of a given target to file

See the README section for detailed information on each entry.

How To Install

Either install using the prepackaged version for your Linux distro or grab the source .tar.gz and simply make install.

You may want to take a look at the README section for detailed info.

Got ideas?

Please take a second to submit your ideas for future features via project's issues 🙏