make up
make down
make clean
make upgrade
make migrate
Easier than having to think about it
make up
make down
make clean
make upgrade
make migrate
Easier than having to think about it
The sibling's comment (re. just shell in files) is good too, and often I'll put all the various commands into a subdir, and `just` is just an interface to that, particularly so if a given script/command gets complex.
Then, `just` is really a signal "hey, this repo supports this interface" and things like `just -l` for discoverability.
mything() {
# ...
}
otherthing() {
# ...
}
if [ $# -eq 0 ]; then
echo "Usage: ./run.sh [mything, otherthing]"
exit 1
fi
"$@"Each lifecycle hook should be a an executable of some sort like "scripts/{{command}}", be it a shell script or something else.
Make gives me a single, predictable and stable interface to the repo.
From the root of the repo, I can type `make <tab>` and get a list of available tasks. Alternatively, there's a Makefile on the root.
With scripts, I need to type... what? `./<tab>` and look for clues? Maybe the scripts are in `scripts/`, maybe they're in `build/`, maybe they're in `ci/`...
Even if I know where the scripts are, `make task` is quicker and easier to type than `./scripts/task.sh`.
One could just use a make task to call a script, which I have done, but in most cases if you do that, what's the point of the script?
For starters, not having to indent every line with a tab, put backslashes at the end of each line, or double every $ sigil in the script. Being able to transparently replace it with perl or python or some other non-shell-script is an occasional bonus.
I made an entire presentation about this[1], trying to sell it to work mates.
[1]: https://jiby.tech/presentation/makefiles/makefiles.html