Rhiz
A deliberately minimal task runner.
This is an in-progress-pre-alpha project.
Rhiz executes tasks defined in a "Rhizfile" which contains task descriptions with a Lisp-like syntax.
(task "hello"
(log "Rhiz says hello"))
;; Comments start with a semicolon
(task "fizzbuzz"
"Tasks can have an optional description" ;; Strings are double-quoted.
(exec fizzbuzz.exe)
(log "The fizz was buzzed"))
(task "clean"
(delete "./output"))
Task execution
Tasks are executed relative to the root directory, not the directory where
rhiz
is invoked. When rhiz
is invoked.
The commands in a task are executed serially, and if a command returns a non-zero exit code the the task immediately exits.
Rhizfile syntax
Rhiz has two primitives:
- Strings, which should be double-quoted (e.g
"Sphinx of black quartz, judge my vow"
) - Atoms, whitespace-separated words (e.g.
task
,log
,cargo
)
They can be used interchangeably in some places, but not everywhere.
Tasks and commands are built of s-expressions, which are a list followed by one or more arguments (which can be strings, atoms, or other s-expressions).
For example, the expression
(task "foo" (exec foo))
has the command task
with the arguments "foo"
and (exec foo
), which are a
string and an s-expression, respectively.