diff --git a/docs/UX-standards/launcher-standard.adoc b/docs/UX-standards/launcher-standard.adoc index 9ace12eb..5e3cdcd7 100644 --- a/docs/UX-standards/launcher-standard.adoc +++ b/docs/UX-standards/launcher-standard.adoc @@ -170,6 +170,14 @@ fi | `--help` / `-h` | Print usage text, including a description of every mode, the files the launcher reads/writes, and the detected platform. + +| `--version` / `-V` +| Print the launcher's version on a single machine-greppable first line, + then exit 0. Format: ` () []` + (e.g. `aerie-launcher 0.4.2 (a1b2c3d) [linux-x86_64]`). Additional lines + (build date, runtime versions) MAY follow. Required so field bug reports + can quote a specific build — a launcher without `--version` produces + unactionable issues. |=== NOTE: `--integ` and `--disinteg` replace the earlier pattern of separate diff --git a/launcher/launcher-standard.a2ml b/launcher/launcher-standard.a2ml index 6075d9ec..dc57fcf4 100644 --- a/launcher/launcher-standard.a2ml +++ b/launcher/launcher-standard.a2ml @@ -46,7 +46,20 @@ final-shell = "bash -l at REPO_DIR (never 'press enter to close')" # These are the modes every compliant launcher MUST implement. runtime = ["--start", "--stop", "--status", "--auto", "--browser"] integration = ["--integ", "--disinteg"] -meta = ["--help"] +meta = ["--help", "--version"] + +[version-output] +# Required format for the `--version` mode. The first line MUST be +# machine-greppable so field bug reports can quote it verbatim. Optional +# additional lines (build SHA, build date, libc / runtime versions) MAY +# follow on subsequent lines. +# +# Rationale: a launcher with no --version produces unactionable bug +# reports — "it's broken on my machine" with no way to tell which build. +first-line-format = "{app-name} {version} ({build-sha-short}) [{platform}]" +example = "aerie-launcher 0.4.2 (a1b2c3d) [linux-x86_64]" +exit-code = 0 +machine-greppable = true [optional-modes] # Modes launchers MAY implement for extra functionality.