Caution
This software is not verified, will have breaking changes and might have bugs.
Ror is a PFE task runner.
ror [flags] [task] [task args]--export-taskfile: Exportror.kdltoTaskfile.yml(for compatibility with Task).-s,--silent: Silent mode (no output).-v: Verbose output.-vvv: Very verbose output.
version: Print version.help: Print help message.
Ror uses KDL v2 for its configuration file ror.kdl. The file defines a set of tasks that can be executed.
Tasks are defined using the task node followed by the task name.
taskmy-task {
...
}You generally don't need quotes for task names unless they contain special characters (like spaces, brackets ()[]{} or symbols like =, ,, ;, \, /, <, >) or look like a number, boolean, or null.
Common safe characters include letters, numbers, -, and _.
Inside a task, you can define the following properties:
description: A string describing what the task does.cmd: The command to run.depends: A block listing dependencies usingon.
Dependencies define other tasks that must run successfully before the current task. They are specified within a depends block using on.
taskinstall {
depends {
on"build"
}
cmd"cp ./app /usr/local/bin/app"
}The cmd node specifies the shell command to execute. It supports variable substitution.
Variables are defined using where nodes attached to the cmd node or nested within other where nodes. They are substituted using %%variable_name%%.
Variable name can only contain symbols A-Z, a-z, 0-9, _ and -.
wheremy-var="value"Variables can be the result of a shell command execution by adding an { execute } block.
wherecurrent-date="date +%Y-%m-%d" { execute }We can go even deeper:
wherecurrent-date="date %%format%%" { whereformat="+%Y-%m-%d" execute
}A simple task to run a command.
taskrun {
description"Run the project" cmd"go run ./main.go"
}A build task that injects git commit hash and compilation time into the binary.
taskbuild {
description"Build the application" cmd"go build -o out/app -ldflags='-X main.commit=%%commit%% -X main.date=%%date%%' ./cmd/app" {
wherecommit="git describe --tags --always --dirty" { execute }
wheredate="date +%Y-%m-%dT%H:%M:%SZ" { execute }
}
}A deploy task that ensures the application is tested and built first.
taskdeploy {
description"Deploy the application" depends {
on"test" on"build"
}
cmd"./scripts/deploy.sh"
}