diff --git a/modules/mesh-delivery-view/cmd/mesh-delivery-cli/main.go b/modules/mesh-delivery-view/cmd/mesh-delivery-cli/main.go index 24a732b17..74959b66a 100644 --- a/modules/mesh-delivery-view/cmd/mesh-delivery-cli/main.go +++ b/modules/mesh-delivery-view/cmd/mesh-delivery-cli/main.go @@ -3,6 +3,8 @@ // to write the operator's answer to an ask that needs no proof of who answered (the view refuses the merge's Approve). `holds` // lists every fingerprint the assigner holds with its node, cause and answer; `hold-release [words]` and // `hold-keep [words]` answer its hold ask, again when the operator changes their mind (issue 1906). +// `pipelines [branch]` and `pipeline [mover]` are the pipelines page (design 47 H2 H-A-467): a branch's newest +// pipelines, one pipeline's mover rows or one mover's steps; with -follow printed again at each change the runner's events say. package main import ( @@ -13,7 +15,9 @@ import ( "os" "strings" "text/tabwriter" + "time" + seat "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-contracts/go/seats/meshpipelinerunner" "mesh-delivery-view/internal/view" ) @@ -31,9 +35,14 @@ func run(args []string, socket string, out, errOut io.Writer) int { fs := flag.NewFlagSet("mesh-delivery-cli", flag.ContinueOnError) fs.SetOutput(errOut) asJSON := fs.Bool("json", false, "print the rows as JSON") + follow := fs.Bool("follow", false, "pipelines and pipeline: print again at each change the runner's events say, until interrupted") + next := fs.String("next", "", "pipeline: the cursor of the next page a pipeline's answer named") if err := fs.Parse(args); err != nil { return 2 } + if fs.NArg() > 0 && (fs.Arg(0) == "pipelines" || fs.Arg(0) == "pipeline") { + return pipelines(socket, fs.Args(), *next, *follow, *asJSON, out, errOut) + } if fs.NArg() > 0 && fs.Arg(0) == "holds" { return holds(socket, *asJSON, out, errOut) } @@ -53,7 +62,7 @@ func run(args []string, socket string, out, errOut io.Writer) int { } if fs.NArg() > 0 { if fs.Arg(0) != "answer" || fs.NArg() < 3 { - fmt.Fprintln(errOut, "mesh-delivery-cli shows the rows, or answers: mesh-delivery-cli answer