feat(cli): --version/-V + in-app version command + release guard (ADR-0054)
Cargo.toml version is the single source of truth, surfaced by a --version/-V CLI flag and an in-app `version` command (both via cli::version_text -> cli.version_line). release.yaml gains a guard that fails the release unless the v* tag equals v<CARGO_PKG_VERSION>, keeping --version, the release name, and the asset in lockstep. New app command wired across grammar/REGISTRY/dispatch/usage/help/hint-corpus/keys; 6 test-first tests. Also fixes a stale "macOS deferred" comment in release.yaml. ADR-0054 + README index + plan-doc step 1.
This commit is contained in:
@@ -162,6 +162,10 @@ error:
|
||||
# ---- Help text (CLI banner + in-app `help` command) ------------------
|
||||
# ---- CLI argument-parsing errors (stderr before TUI starts) ---------
|
||||
cli:
|
||||
# Version line for `--version` / `-V` and the in-app `version` command
|
||||
# (ADR-0054). `{version}` is `CARGO_PKG_VERSION` — the single source of
|
||||
# truth, equal to the `v*` release tag (release CI guards the match).
|
||||
version_line: "rdbms-playground {version}"
|
||||
missing_value: "missing value for --{flag}"
|
||||
invalid_value: "invalid value for --{flag}: {value} (expected one of: {expected})"
|
||||
unknown_argument: "unknown argument: {arg}"
|
||||
@@ -186,6 +190,7 @@ help:
|
||||
|
||||
Options:
|
||||
-h, --help Print this help and exit.
|
||||
-V, --version Print the version and exit.
|
||||
--theme <light|dark> Override theme (default: auto-detect).
|
||||
--data-dir <PATH> Use PATH as the data root instead of
|
||||
the OS-standard location for this run.
|
||||
@@ -210,6 +215,7 @@ help:
|
||||
|
||||
App-level commands (typed inside the app, available in both modes):
|
||||
quit Exit cleanly.
|
||||
version Print the application version.
|
||||
mode simple|advanced Switch input mode.
|
||||
help Show this list of commands in-app.
|
||||
save Save the current temp project under a
|
||||
@@ -258,6 +264,8 @@ help:
|
||||
help <command> — detailed help for one command (e.g. `help insert`)
|
||||
hint: |-
|
||||
hint — explain the most recent error (press F1 for a hint on what you're typing)
|
||||
version: |-
|
||||
version — print the application version (same as the `--version` command-line flag)
|
||||
rebuild: |-
|
||||
rebuild — rebuild the project database from project.yaml + data/ (with confirmation)
|
||||
save: |-
|
||||
@@ -425,6 +433,9 @@ hint:
|
||||
hint:
|
||||
what: "Explain the most recent error — or, pressing F1 while typing, the command you're building."
|
||||
example: "hint"
|
||||
version:
|
||||
what: "Print the application version."
|
||||
example: "version"
|
||||
rebuild:
|
||||
what: "Rebuild the project database from its saved text files."
|
||||
example: "rebuild"
|
||||
@@ -874,6 +885,7 @@ parse:
|
||||
quit: "quit"
|
||||
help: "help [<command>]"
|
||||
hint: "hint"
|
||||
version: "version"
|
||||
rebuild: "rebuild"
|
||||
save: "save | save as"
|
||||
new: "new"
|
||||
|
||||
Reference in New Issue
Block a user