neomake
is a fully open source task runner CLI utility that acts as a modern alternative to known utilities.
neomake
is currently a pre-release and to be considered as unstable. It is actively maintained and used in production.
neomake -e describe -c ...
to view the task chains and the stages (in order) they are executed in.yaml
file, including support for handy features such as YAML anchors (and everything in the YAML 1.2 standard).neomake
uses as interpreter for the command. You can also specify arguments that are provided per invocation via the command line, working directories and environment variables on multiple different levels. Generally, the most inner scope will extend or replace the outer scope.neomake
is distributed through cargo
.
1) cargo install neomake
neomake init
neomake run -c test -c othertest -a args.test="some argument"
neomake -e describe -c test -c othertest -o yaml
```yaml version: 0.2
env: DEFAULTENVVAR: default var OVERRIDEENVVAR0: old e0 OVERRIDEENVVAR1: old e1
.anchor: &anchor | printf "test anchor"
chains: python: description: This is an example of using multiple execution environments (shell and python). shell: program: bash args: - -c tasks: - shell: program: python args: - -c script: print('yada') - script: "printf test" - script: *anchor
a: matrix: - env: VALUE: a 0 - env: VALUE: a 1 tasks: - script: echo "$VALUE" b: pre: - a tasks: - script: echo "b" c: pre: - b tasks: - script: echo "c"
minimal: tasks: - script: echo "minimal"
graph: pre: - minimal - a - b tasks: []
test: matrix: - env: OVERRIDEENVVAR0: new e0 tasks: - env: OVERRIDEENVVAR1: new e1 script: | set -e
echo "$DEFAULT_ENV_VAR"
sleep 1
echo "$OVERRIDE_ENV_VAR_0"
sleep 1
echo "$OVERRIDE_ENV_VAR_1"
sleep 1
echo "A"
sleep 1
echo "B"
sleep 1
echo "C"
sleep 1
echo "D"
sleep 1
echo "{{ args.test }}" # this will require an argument to be passed via '-a args.test="some-argument"'
sleep 1
unknown-command
echo "too far!"
```
Why would someone build a task runner if there's many alternatives out there? A few of the most well known task running utilities / frameworks are (non exhaustive):
make
(Makefile
) - the original as well as many different implementationsEarthly
(Earthfile
) - executing tasks inside of containerspyinvoke
(tasks.py
) - executing tasks from within python scriptsI built this utility because all of the alternatives I have tried, including the ones listed above were lacking some features. I was basically looking for a subset of the functionality which the GitLab pipelines provide incl. features such as matrix builds and more. Especially things like invoking commands in many locations, parallelizing tasks, easy parameterization and a few more.