Add local candidate validation

This commit is contained in:
2026-10-05 17:47:50 +00:00
parent be225cf634
commit 617c243923
14 changed files with 939 additions and 34 deletions

View File

@@ -1,13 +1,30 @@
# Command line
ReleaseKit currently provides one command:
ReleaseKit currently provides two commands.
Print the executable version:
```sh
go run ./cmd/releasekit version
```
It prints `releasekit <version>` followed by a newline and exits with status 0.
This prints `releasekit <version>` followed by a newline and exits with status 0.
The version comes from [`buildinfo.Version`](consumers/runtime-version.md).
Any other argument sequence prints an error message followed by
`usage: releasekit version` to standard error and exits with status 2.
Check a local candidate:
```sh
go run ./cmd/releasekit check [--repo DIR] [--config FILE] VERSION
```
`VERSION` must use stable `vMAJOR.MINOR.PATCH` syntax. Options must precede the
version. The repository defaults to the current directory, and the profile
defaults to `<repository>/releasekit.json`. A successful command prints the
captured local commit and version. It checks the committed release note, local
Git state, and configured validation, but does not inspect remote availability
or publish a tag.
Both commands write errors and diagnostic output to standard error. `check`
returns status 0 after local validation, 1 after a candidate validation failure,
and 2 for usage, profile, or invalid-version errors. Unsupported argument
sequences print usage to standard error.