4 ms·
In my latest company we made a bash script called "run". We put a bunch of commands in there like "setup", "download-certs", "deploy-staging", "deploy-prod", "f
by AJRF 1y ago
In my latest company we made a bash script called "run". We put a bunch of commands in there like "setup", "download-certs", "deploy-staging", "deploy-prod", "fix", "test"
so you run like this:
./run setup
And all the commands can be listed by running:
./run
If I wanted a chart the command could spit out a png somewhere and tell you about it.
There are no dependencies to run the script, and if any of the commands needed dependencies you could just put them in setup and call setup from a commmand.
- camilomatajira 1y agoThis is very useful, though I would recommend using a Makefile instead. You will get a lot out of the box: completion in your shell, idempotency (in case you are interested), useful string interpolation, easy variables injection, etc. You could keep the content of your bash functions close to intact by adding the ".ONESHELL:" target (and some \$).
- zokier 1y agoJust is better choice imho https://github.com/casey/just https://github.com/casey/just