All Projects → kenreitz42 → Bake

kenreitz42 / Bake

Licence: isc
Bake — the strangely familiar workflow utility.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
bash
514 projects

Projects that are alternatives of or similar to Bake

Cookiecutter Lux Python
Cookiecutter template for an idiomatic Python project driven by Makefile
Stars: ✭ 102 (-82.97%)
Mutual labels:  makefile, make
Teachingmaterial
Various teaching material
Stars: ✭ 159 (-73.46%)
Mutual labels:  makefile, make
Mmake
Mmake is a small program which wraps make to provide additional functionality, such as user-friendly help output, remote includes, and eventually more. It otherwise acts as a pass-through to standard make.
Stars: ✭ 1,593 (+165.94%)
Mutual labels:  makefile, make
Make Docker Command
Seamlessly execute commands (composer, bower, compass) in isolation using docker and make.
Stars: ✭ 82 (-86.31%)
Mutual labels:  makefile, make
Task
A task runner / simpler Make alternative written in Go
Stars: ✭ 4,282 (+614.86%)
Mutual labels:  makefile, make
Gomk
An opinionated Makefile for Go projects.
Stars: ✭ 96 (-83.97%)
Mutual labels:  makefile, make
Terraform Makefile
Helps me actually use terraform for multiple environments
Stars: ✭ 143 (-76.13%)
Mutual labels:  makefile, make
Make Handbook
Handbook about modern make usage
Stars: ✭ 85 (-85.81%)
Mutual labels:  makefile, make
Mach
A remake of make (in ClojureScript)
Stars: ✭ 240 (-59.93%)
Mutual labels:  makefile, make
Zeus
An Electrifying Build System
Stars: ✭ 176 (-70.62%)
Mutual labels:  makefile, make
Wordpress Starter
📦 A starter template for WordPress websites
Stars: ✭ 26 (-95.66%)
Mutual labels:  makefile, make
Checkmake
experimental linter/analyzer for Makefiles
Stars: ✭ 420 (-29.88%)
Mutual labels:  makefile, make
Reggae
Build system in D, Python, Ruby, Javascript or Lua
Stars: ✭ 141 (-76.46%)
Mutual labels:  makefile, make
Intellij Makefile
Makefile support for IntelliJ-based IDEs
Stars: ✭ 164 (-72.62%)
Mutual labels:  makefile, make
Ios Project Env Setup
Setup your iOS project environment with a Shellscript, Makefile or Rakefile
Stars: ✭ 320 (-46.58%)
Mutual labels:  makefile, make
Mask
🎭 A CLI task runner defined by a simple markdown file
Stars: ✭ 495 (-17.36%)
Mutual labels:  makefile, make
Beak
A command line interface for your Swift scripts
Stars: ✭ 537 (-10.35%)
Mutual labels:  make
Buildroot
Tesla's buildroot repository
Stars: ✭ 552 (-7.85%)
Mutual labels:  makefile
Pinn
An enhanced Operating System installer for the Raspberry Pi
Stars: ✭ 530 (-11.52%)
Mutual labels:  makefile
Unix
Mirror of the Restoration of 1st Edition UNIX kernel sources from pdf document.
Stars: ✭ 524 (-12.52%)
Mutual labels:  make

$ 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: [email protected]" 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, you can write real bash code!      Any and all syntax is accepted — no magic going on here. ;)
  • Unlike Makefile, you may utilize      [ 4 × U+0020 a.k.a. “spaces”] for indentation.
  • Environment variables are explicitly passed or whitelisted (--allow), not inherited from the parent shell.
  • Tasks can be run safely and reliably. Rest assured that scripts are executed from the project root directory.
  • There are many other benefits to this design, that have yet to be expressed in this document.

Automate Workflows — Bootstrap Development Environments — Commit The Tasks

I love using Makefile for one-off tasks in projects.

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).

project seeks to bridge all of these worlds into a single entrypoint — ideal for cross–language repositories


Bootstraping bake —                                          (for local development workflows)

Various *nix Distributions (Python 3.6+):

The primary installation method of bake, today, is via pip:

$ pip3 install bake-cli
Collecting bake-cli
…
Successfully installed bake-cli-0.2.0 delegator.py-0.1.1 pexpect-4.7.0 ptyprocess-0.6.0

This will always work, but it will not be the default recommendation.

MacOS (Previously known as OS X)

Installation of bake will (soon) be very easy, with Homebrew. The formula needs a subtle adjustment — if you want to help, here's the repo!

$ brew install kennethreitz/-/bake
==> Installing bake from kennethreitz/-
…
🍺  /usr/local/Cellar/bake/19-09-16: 1,563 files, 16.7MB, built in 11 seconds

Homebrew will be the primary installation target of bake.

✨🍰✨

Bootstraping bake —                                             (for production workflows)

Containers! e.g. Docker.

You an also run bake via Docker! An official image has been made available on DockerHub:

$ docker run kennethreitz/bake                                                                                                                                                                       Wed Sep 18 10:11:01 2019
No Bakefile found!
Usage:  [OPTIONS] [TASK] [ARGUMENTS]...

 $ bake — the strangely familiar task–runner.

Options:
  -b, --bakefile PATH      The Bakefile to use.
  -l, --list               Lists available tasks (and their dependencies).
  -h, --help               Show this message and exit.
  --allow TEXT             Whitelist an environment variable for use.
  --no-deps                Do not run dependent tasks.
  --yes                    Set medium–security prompts to yes.
  --continue               Continue, if a task fails.
  -i, --interactive        Run in interactive mode.
  --insecure               Inherit parent shell's environment variables.
  -s, --silent             Reduce output.
  -e, --environ-json TEXT  Provide environment variables via JSON.
  -j, --json               Output in JSON format (stdout).
  • Bakefile is expected to live at /app/Bakefile.
  • If you inherit from this image, ONBUILD directives will automatically copy your application code (build context) into the container, into /app.

Bonus Points: this image is also available on the GitHub Package Registry (beta).


Team & Workflow Management

You can use bake to bootstrap your team's development environments, ensuring a smooth and optimal workflow & local development experience.

Here's an example, using the Bakefile provided above:

$ bake install
 + Executing install/node:
 |  yarn install v1.17.3
 |  info No lockfile found.
 |  [1/4] Resolving packages...
 |  [2/4] Fetching packages...
 |  [3/4] Linking dependencies...
 |  [4/4] Building fresh packages...
 |  success Saved lockfile.
 |  Done in 0.05s.
 + Executing install/python:
 |  Installing dependencies from Pipfile.lock (f10bb0)…
 + Executing install:
 + Done.

Skip Steps, Automatically

Because we configured yarn.lock and Pipfile.lock as cache keys, bake will automatically skip the configured steps— only running them when the files are changed!

So, let's run that command again :)

$ bake install
 + Skipping install/node:
 + Skipping install/python.
 + Executing install:
 + Done.

Neat, eh?

Arguments & Parameters: Passing Values In

$ bake utils/argv KEY=VALUES 1 2 3
 + Executing utils/argv:
 |  VALUES: 1 2 3
 + Done.

(Optional) Non-Deterministic Confirmation Dialouges

$ bake utils/deploy
   What is 10 times 2?: 7
Aborted.

Community / Contrib


 

This open source software has been designed, for you, with much joy, by the hands of:

 

 

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].