Commit Graph

5 Commits

Author SHA1 Message Date
Jan Nedbal
362bd6ae7c cli: accept --json/-v/-q on every subcommand, not only top level
Before this change, only the top-level parser defined --json, -v and -q.
Argparse processes arguments left-to-right and hands off to the subparser
after seeing the subcommand name, so the idiomatic

    metin-release release inspect --source X --json

failed with 'unrecognized arguments: --json'. Users had to write

    metin-release --json release inspect --source X

which is the opposite of what every modern CLI does. Attach a shared
--json/-v/-q flag set to every subparser via a small helper. Same dest
means the last occurrence on the command line wins, which is the intuitive
behaviour. Both placements are now accepted; tests unchanged.
2026-04-14 19:04:55 +02:00
Jan Nedbal
e4f91c9cd0 docs: add phase 1 cli reference 2026-04-14 18:59:50 +02:00
Jan Nedbal
d2dd2c88b6 tests: cover phase 1 commands end to end
Pytest suite with a tiny_client fixture, an ephemeral Ed25519 keypair
fixture, and a threaded HTTPServer helper. Exercises cli dispatch,
inspect (including excluded-path handling), build-manifest and sign
against the real m2dev-client scripts, diff-remote via a local server,
and the full release publish composite against a local rsync target.
2026-04-14 18:59:50 +02:00
Jan Nedbal
e70fc300e2 cli: scaffold phase 1 asset release commands
Add metin-release CLI with argparse dispatcher, result envelope and
error hierarchy, and the full Phase 1 release subcommand set:

  release inspect         - scan source root
  release build-manifest  - wraps make-manifest.py
  release sign            - wraps sign-manifest.py, enforces mode 600
  release diff-remote     - HEAD each blob hash against a base URL
  release upload-blobs    - rsync release dir minus manifest
  release promote         - rsync manifest.json + signature
  release verify-public   - GET + Ed25519 verify, optional blob sampling
  release publish         - composite of the above with per-stage timings

Respects --json / --verbose / --quiet. Exit codes follow the plan
(1 validation, 2 remote, 3 integrity, 4 reserved for ERP).
2026-04-14 18:59:50 +02:00
fb1e0cda87 Initial commit 2026-04-14 18:51:38 +02:00