I don't use Makefile anymore! instead I use bake-cli

zodman

Andres 🐍 in 🇨🇦

Posted on July 17, 2022

I don't use Makefile anymore! instead I use bake-cli

before know about bake-cli I'm do a lot of makefiles.. Because it's oldschool and because you could define task to execute easily!

And its great, then I find out fabric and invoke, OH my good! I felt in :love: I start a writing task in python for my local development. But I miss the a lot the simpliest of the makefiles.

But the makefiles isn't create to execute tasks, it was created and designed to compile code.

Then I ever miss in makefiles the possibility of run bash scripting inside.

The same feeling kennethreitz had.

The problem with doing this is that you can't use familiar bash–isms when doing so, as GNU Make doesn't use the familiar Bash syntax, nor does it allow for simple ad–hoc use of arbitrary scripting languages (e.g. Python).

Therefore bake-cli born.

You create a Bakefile and put the task inside with bash power!

$ cat Bakefile                                                $ bake install
install: install/node install/python                            + Executing install/node:
    echo 'All ready!'                                           |  yarn install v1.17.3
install/full: install/system install                            |  info No lockfile found.
install/python: @skip:key=Pipfile.lock                          |  [1/4] Resolving packages...
    pipenv install                                              |  [2/4] Fetching packages...
install/node: @skip:key=yarn.lock                               |  [3/4] Linking dependencies...
    yarn install                                                |  [4/4] Building fresh packages...
install/system: @confirm                                        |  success Saved lockfile.
    brew install pipenv yarn                                    |  Done in 0.05s.
                                                                + Executing install/python:
python/format:                                                  |  Installing dependencies from …
    black .                                                     + Executing install:
                                                                |  All ready!
utils/argv:                                                     + Done.
    set -u && echo "$HELLO: $@"                                 
                                                                Rinse and repeat…
utils/deploy: @confirm:secure                 
    exit 0                                              

Enter fullscreen mode Exit fullscreen mode

Scrollme right

You will speedout your development with this! replace the makefiles

GitHub logo kennethreitz / bake

Bake — the strangely familiar workflow utility.

$ bake — a s☿rangely familiar workflow utility.            

~ under development ~  

$ cat Bakefile $ bake install install: install/node install/python + Executing install/node echo 'All ready!' | yarn install v1.17.3 install/full: install/system install | info No lockfile found install/python: @skip:key=Pipfile.lock | [1/4] Resolving packages... pipenv install | [2/4] Fetching packages... install/node: @skip:key=yarn.lock | [3/4] Linking dependencies... yarn install | [4/4] Building fresh packages... install/system: @confirm | success Saved lockfile. brew install pipenv yarn | Done in 0.05s. + Executing install/python: python/format: | Installing dependencies from … black . + Executing install: | All ready! utils/argv: + Done. set -u && echo "$HELLO: $@" Rinse and repeat… utils/deploy: @confirm:secure exit 0

~ see bake's own Bakefile ~            

What's in the oven?

  • A Bakefile, which looks and feels like the good parts of a Makefile.
  • Except…

Its a nodejs version too of it.

💖 💪 🙅 🚩
zodman
Andres 🐍 in 🇨🇦

Posted on July 17, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related