Trên GitHub, kennethreitz/bake đã đạt 636 sao, ngôn ngữ Python. Bake — the strangely familiar workflow utility.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
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:
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:
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!
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/kennethreitz/bake là nguồn chính thức.