mirror of
https://github.com/kennethreitz/bake.git
synced 2026-06-05 23:00:17 +00:00
marketing
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
|
||||
I love using `Makefile`s for one-off tasks in projects. The problem with doing this, is you can't use familiar bash–isms when doing so, as GNU Make doesn't use the familiar Bash sytnax. This project seeks to bridge these works.
|
||||
|
||||
## Example `Bashfile`
|
||||
## Example `Bakefile`, for use with `bake`:
|
||||
|
||||
To be improved:
|
||||
|
||||
```make
|
||||
echo:
|
||||
cat Bashfile
|
||||
cat Bakefile
|
||||
format:
|
||||
black .
|
||||
|
||||
@@ -25,6 +25,9 @@ system-deps:
|
||||
brew install pipenv
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- a `Bakefile`
|
||||
Unlike `Makefile`, either tabs or 4 spaces can be used.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -188,7 +188,7 @@ class TaskScript:
|
||||
pass
|
||||
|
||||
|
||||
class Bashfile:
|
||||
class Bakefile:
|
||||
def __init__(self, *, path):
|
||||
self.path = path
|
||||
self.environ = os.environ
|
||||
@@ -201,7 +201,7 @@ class Bashfile:
|
||||
self.chunks
|
||||
|
||||
def __repr__(self):
|
||||
return f"<Bashfile path={self.path!r}>"
|
||||
return f"<Bakefile path={self.path!r}>"
|
||||
|
||||
def __getitem__(self, key):
|
||||
return self.tasks[key]
|
||||
+2
-2
@@ -2,7 +2,7 @@ import sys
|
||||
import click
|
||||
import crayons
|
||||
|
||||
from .bashfile import Bashfile
|
||||
from .bakefile import Bakefile
|
||||
from .config import config
|
||||
|
||||
SAFE_ENVIRONS = ["HOME"]
|
||||
@@ -104,7 +104,7 @@ def task(
|
||||
task = None
|
||||
|
||||
if bashfile == "__BASHFILE__":
|
||||
bashfile = Bashfile.find(root=".")
|
||||
bashfile = Bakefile.find(root=".")
|
||||
if secure:
|
||||
for key in bashfile.environ:
|
||||
if key not in SAFE_ENVIRONS:
|
||||
|
||||
Reference in New Issue
Block a user