You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-8Lines changed: 19 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
> `bake`: The best thing since sliced artisanal organic heirloom sourdough cultured ... no, no, lets calm down, its just an automation tool.
4
4
5
-
Pure bash build framework. No libraries, no dependencies (in this framework). Designed in the spirit of rake and make. I wished for a self-contained tool that did not require any more bootstrapping than running curl or a single scp, so I made this.
5
+
Pure bash build framework. No libraries, no dependencies (in this framework). Designed in the spirit of rake and make. I wished for a self-contained tool that did not require any more bootstrapping than running curl or a single `scp`, so I made this.
6
6
7
7
The API follows in the spirit of Ruby's amazing and wonderful Rake utility.
8
8
@@ -96,7 +96,7 @@ Pushes a file system path onto the end of `BAKEPATH`.
96
96
97
97
### `bake_require libname`
98
98
99
-
Searches `BAKEPATH` for the library and sources it, loading the file (executing its contents). Libraries should (generally) only contain declarations, as any imperative code will be executed when the library is loaded. Libraries may load other libraries.
99
+
Searches `BAKEPATH` for the library and sources it, loading the file (executing its contents). Libraries should (generally) only contain declarations, as any imperative code will be executed when the library is loaded. Libraries may load other libraries.
100
100
101
101
You can also load libraries from Github or Enterprise Github instances. See the [Remote Libraries](#remote_libraries) section for more details.
102
102
@@ -150,6 +150,7 @@ This section is chock full of tips for how to get the most out of your `bake` ex
150
150
* Return instead of exit, but use return values please!
151
151
* Don't put naked shell code in your `Bakefile` or libraries if you can help it!
152
152
* Idempotency is your friend, take the time to make your functions idempotent
153
+
* When Enough is Enough, Graduate to a More Powerful Tool
bake_echo_red "Error: please copy $CONFIG.template to $CONFIG and
212
-
bake_echo_red "fill in the required paramters."
213
+
bake_echo_red "fill in the required parameters."
213
214
return 1
214
215
fi
215
216
source "$CONFIG"
@@ -255,17 +256,17 @@ function init () {
255
256
# check configuration
256
257
if [ !-e"$CONFIG" ];then
257
258
bake_echo_red "Please copy config/config-template.json to $CONFIG"
258
-
bake_echo_red "and fill in the required values (such as the databse connection parameters)"
259
+
bake_echo_red "and fill in the required values (such as the database connection parameters)"
259
260
return 1
260
261
fi
261
262
262
263
if [ !-e"$ALEMBIC_CONFIG" ];then
263
264
bake_echo_red "Please copy config/alembic-config-template.ini to $ALEMBIC_CONFIG"
264
-
bake_echo_red "and fill in the required values (such as the databse connection parameters)"
265
+
bake_echo_red "and fill in the required values (such as the database connection parameters)"
265
266
return 1
266
267
fi
267
268
268
-
# make sure our pre-requisits are installed
269
+
# make sure our prerequisites are installed
269
270
pip install -r requirements.txt
270
271
271
272
INIT_CALLED="true"
@@ -340,6 +341,16 @@ function download-package () {
340
341
}
341
342
```
342
343
344
+
## When Enough is Enough, Graduate to a More Powerful Tool
345
+
346
+
Although `bake` ultimately has all the same features and expressiveness as shell scripting in`bash`, and is quite capable, it's intended to be for lightweight project automation. If you find yourself needing a lot of additional utilities to be installed to run your `Bakefile`s or have significant and complex logic, and ultimately need a more fully featured build tool or programming language you should graduate to one. `bake` may still be there for you as what it was intended for - a helpful task runner for your more complex steps.
347
+
348
+
# My Thoughts on `bake` vs Other Build and Project Automation Tools
349
+
350
+
`make` is definitely more standard, has built in facilities for performing dependency analysis and is a much better suited tool for the parts of your project that are working with C and C++ source code. Though `make` introduces additional complexity if you need to implement additional logic, you're free to embed shell commands, though the rules forescaping special characters between `make` and `bash` tends to get complex quickly. Re-usein`make` can be trickier than in shell scripts. `make` isn't a task runner, though you can use `.PHONY` targets to simulate this, it doesn't have a facility for offering a catalog of available tasks along with descriptions.
351
+
352
+
`rake` is a wonderful tool, providing a succinct, internal, DSL for defining tasks and scaling up to the full `ruby` programming language. For my use-cases it brought with it the complexity of managing the installation and run-time of both ruby and various libraries.
353
+
343
354
# Further Reading
344
355
345
356
`bake` is at its core a collection of shell functionand strongly followed conventions. Learning `bash` is therefor a great idea for getting the most out of `bake`. This has the added benefit of becoming great at that venerable, widely applicable skill: shell scripting.
@@ -355,6 +366,8 @@ cd build
355
366
bake make-release
356
367
```
357
368
369
+
Gzip the `./release/bake-$VERSION` directory and add it to the github release. Update the homebrew tap with the new download link for the `tgz` file and it's sha256 sum.
0 commit comments