Add build version reporting
This commit is contained in:
12
docs/cli.md
12
docs/cli.md
@@ -10,6 +10,7 @@ defined in [Operations](operations.md).
|
||||
|
||||
~~~
|
||||
notarius help
|
||||
notarius --version
|
||||
notarius run <pipeline-id> --input path/to/source.json [--json] [flags]
|
||||
notarius config validate [--config path/to/config.yml] [--pipeline pipeline-id] [--only lane-a,lane-b]
|
||||
notarius pipelines list [--config path/to/config.yml] [--json]
|
||||
@@ -18,6 +19,17 @@ notarius pipelines list [--config path/to/config.yml] [--json]
|
||||
Running Notarius without arguments, or with **help**, **--help**, or **-h**,
|
||||
writes the command summary to standard output and exits with status 0.
|
||||
|
||||
`notarius --version` is valid only as the sole root argument. It writes exactly
|
||||
`notarius <version>` followed by a newline to standard output and exits with
|
||||
status 0. A tagged `go install` build can report its main-module stable tag,
|
||||
and controlled builds can inject a stable tag at link time through
|
||||
`gitea.maximumdirect.net/eric/notarius/internal/buildinfo.Override`; an ordinary
|
||||
unversioned checkout reports `development`. Invalid injected version content is
|
||||
a runtime error with exit status 1, while extra `--version` arguments are a
|
||||
syntax error with exit status 2. This diagnostic does not replace the
|
||||
[run-result](integrations/run-result.md) or artifact contracts for downstream
|
||||
compatibility decisions.
|
||||
|
||||
## run
|
||||
|
||||
~~~
|
||||
|
||||
@@ -24,10 +24,14 @@ preparation, and runner mechanics after their inputs are supplied.
|
||||
|
||||
## Dispatch And Configuration Handoff
|
||||
|
||||
The root dispatcher handles help, configuration validation, pipeline listing,
|
||||
and a pipeline run. It normalizes injectable options before dispatch so that a
|
||||
missing production dependency fails as a command error rather than reaching
|
||||
execution.
|
||||
The root dispatcher handles help, version reporting, configuration validation,
|
||||
pipeline listing, and a pipeline run. Version reporting resolves build
|
||||
information through `internal/buildinfo` before production composition, so the
|
||||
diagnostic remains available without configuration or runtime collaborators.
|
||||
The public syntax, streams, exit classes, and version semantics are defined by
|
||||
the [CLI reference](../cli.md). Other root commands normalize injectable
|
||||
options before dispatch so that a missing production dependency fails as a
|
||||
command error rather than reaching execution.
|
||||
|
||||
Commands that need configuration use one shared loader. The CLI discovers the
|
||||
file, parses it through **internal/core/config**, starts from defaults, applies
|
||||
|
||||
@@ -41,7 +41,7 @@ operation.
|
||||
- Tag CI validates only. Pre-publication local guards remain mandatory because
|
||||
tag CI cannot prevent an already-pushed tag.
|
||||
|
||||
## Stage 1: Add Build Version Resolution And `--version`
|
||||
## Stage 1: Add Build Version Resolution And `--version` ✅
|
||||
|
||||
### Goal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user