[ANN] bmakelib v0.6.0 with enums

cross-posted from: 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:


<span style="font-weight:bold;color:#a71d5d;">define</span><span style="color:#323232;">-enum : bmakelib.enum.define( DEPLOY-ENV/dev,staging,prod )
</span><span style="color:#183691;">include define-enum
</span><span style="color:#183691;">
</span><span style="color:#183691;">deploy : bmakelib.enum.error-unless-member( DEPLOY-ENV,ENV )
</span><span style="color:#183691;">deploy :
</span><span style="color:#183691;">	@echo 🚀 Deploying to $(ENV)...
</span>

➤ Shell:


<span style="color:#323232;">$ make ENV=local-laptop deploy
</span><span style="color:#323232;">*** 'local-laptop' is not a member of enum 'DEPLOY-ENV'.  Stop.
</span><span style="color:#323232;">
</span><span style="color:#323232;">$ make ENV=prod deploy
</span><span style="color:#323232;">🚀 Deploying to prod...
</span>
  • All
  • Subscribed
  • Moderated
  • Favorites
  • programming@lemmy.ml
  • DreamBathrooms
  • InstantRegret
  • thenastyranch
  • magazineikmin
  • everett
  • rosin
  • Youngstown
  • slotface
  • osvaldo12
  • GTA5RPClips
  • kavyap
  • tacticalgear
  • ethstaker
  • cisconetworking
  • JUstTest
  • cubers
  • mdbf
  • khanakhh
  • ngwrru68w68
  • modclub
  • tester
  • Leos
  • anitta
  • Durango
  • normalnudes
  • megavids
  • provamag3
  • lostlight
  • All magazines