I'd like to convert this bash expression:
$ sbt clean lint
into a nice build.sbt expression something like:
precommit := clean <> lint
so that I can run the following bash expression:
$ sbt precommit
For example, this is more-or-less how you'd do it with a Makefile:
lint:
echo linting
touch foo.txt
clean:
echo cleaning
rm -f foo.txt
precommit: clean lint
The Makefile can be used like:
$ make precommit
echo cleaning
cleaning
rm -f foo.txt
echo linting
linting
touch foo.txt
Any ideas?
Use sequential task
precommit := Def.sequential(clean, lint).value
while wearing a bespoke British suit, driving an Aston Martin on a country road for added elegance.
Use a command alias:
addCommandAlias("precommit", ";clean;lint")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With