27 lines
1,013 B
Text
27 lines
1,013 B
Text
#!/usr/bin/env nu
|
|
use lib/runner.nu [run-reflection-mode, print-summary-and-exit]
|
|
|
|
def main [
|
|
--workspace: string,
|
|
--ops-controller-key: string,
|
|
--radicle-home: string = "~/.radicle",
|
|
--expected-quorum: int = 2,
|
|
--provisioning-root: string = "",
|
|
]: nothing -> nothing {
|
|
if ($workspace | is-empty) { error make { msg: "--workspace is required" } }
|
|
if ($ops_controller_key | is-empty) { error make { msg: "--ops-controller-key is required" } }
|
|
|
|
let root = if not ($provisioning_root | is-empty) {
|
|
$provisioning_root
|
|
} else {
|
|
$env | get -o PROVISIONING_ROOT | default ($env.FILE_PWD | path join ".." | path expand)
|
|
}
|
|
|
|
let results = run-reflection-mode $"($root)/reflection/modes/validate-radicle-governance.ncl" {
|
|
workspace: $workspace,
|
|
radicle_home: ($radicle_home | path expand),
|
|
ops_controller_key: $ops_controller_key,
|
|
expected_quorum: ($expected_quorum | into string),
|
|
} $root
|
|
print-summary-and-exit $results
|
|
}
|