Release v0.6.0 ยท bahmanm/bmakelib
github.com
external-link
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.d...

cross-posted from: https://lemmy.ml/post/8492082

bmakelib is a collection of useful targets, recipes and variables you can use to augment your Makefiles.


I just released bmakelib v0.6.0 w/ the main highlight being the ability to define enums and validate variable values against them.


โžค Makefile:

define-enum : bmakelib.enum.define( DEPLOY-ENV/dev,staging,prod )
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=prod deploy
๐Ÿš€ Deploying to prod...
General Programming Discussion
!programming@lemmy.ml

    A general programming discussion community.

    Rules:

    1. Be civil.
    2. Please start discussions that spark conversation

    Other communities

    Systems

    Functional Programming

    Also related

    • 0 users online
    • 6 users / day
    • 7 users / week
    • 21 users / month
    • 111 users / 6 months
    • 1 subscriber
    • 326 Posts
    • 596 Comments
    • Modlog