There are not a lot of modern / fun books on the subject of bash and make. You can learn it but no one advocates for it like it's the most fun ever. Well it is (once you learn it) the most fun ever. So we can no longer say that no one told us. :)

I'm going to use this post to save the coolest things I learn, because I'm learning.

Make

Make is hands down the easiest way to automate commands instead of telling developers to run them in a README.md. Here is how you make your Make helpful

.DEFAULT_GOAL := help
BLUE := $(shell tput setaf 4)
RESET := $(shell tput sgr0)
help:
    @printf "\n# My App Help\n\n"
    @grep -E '^[^ .]+: .*?## .*$$' $(MAKEFILE_LIST) \
        | awk '\
            BEGIN { FS = ": .*##" };\
            { printf "%-20s$(RESET) %s\n", $$1, $$2 }'
    @printf "\n"

init: ## runs everything to get the app completely setup
    ...

reset: ## hard reset the app
...

reset_db: ## hard reset the db & seed
...

If you include that bit of script at the beginning and those code comments, running make displays a help

# My App Help

init                  runs everything to get the app completely setup
reset               hard reset the app
reset_db         hard reset the db & seed

Once you have a make file to do all the things you currently pass around through readme or word of mouth, you need to mostly call bash scripts and that means knowing bash

Bash

Highly suggest starting your bash scripts with

#!/bin/bash
set -euo pipefail

Here is a cheatsheet for bash strict mode. More to come soon!