majordomus mesh build-cache ensure
Restore a dependency install or a cold cargo build directory from the local level or this node's store, verified by its digest; on a miss run the command and save what it left. MAJORDOMUS_BUILD_CACHE=off bypasses every level
majordomus mesh build-cache ensure
Použití
majordomus mesh build-cache ensure [OPTIONS] <KIND> [COMMAND]Argumenty
| argument | hodnota | výchozí | popis |
|---|---|---|---|
| <KIND> | cargo-build-dir | mix-deps | npm-modules | povinné | What is cached: npm-modules, mix-deps or cargo-build-dir
|
| --dir | <DIR> | — | The directory holding the lockfile, relative to the repository (default: the only one, or the current one) |
| <COMMAND> | <COMMAND> | — | The install or build command, after `--`: run on a miss (and for mix and cargo on every run) |
| --repo | <PATH> | — | Zde začne hledání kořene repozitáře (výchozí: aktuální adresář) (přijímá každý podpříkaz) |
| --discovery | vcs | filesystem | vcs | Jak se vyhledávají deklarativní soubory (přijímá každý podpříkaz)
|
| --strict | flag | — | Odmítne pokračovat, pokud kterýkoli soubor vrstvy nese diagnostiku typu chyba (přijímá každý podpříkaz) |
| --share | <DIR> | — | Adresář share distribuce nástroje (kinds.yaml, schemas/); výchozí: $MAJORDOMUS_SHARE, poté vlastní share/ repozitáře, poté ten vedle spustitelného souboru (přijímá každý podpříkaz) |
| --format | text | json | text | `text` pro člověka, `json` pro stroj; oba vykreslí stejnou odpověď
|
Příklady
-
Run an install through the build cache
The command after `--` is what the install would run anyway. With the lockfile's key already in place nothing runs; a hit is restored from the local level or this node's store after its SHA-256 matches, and npm's install is then not run; a miss runs the command and saves what it left. A repository that tracks no such lockfile runs the command uncached and says why, as here; MAJORDOMUS_BUILD_CACHE=off bypasses every level. The exit code is the command's.
$ majordomus mesh build-cache ensure npm-modules -- trueWhat it asserts: exits 0; prints source uncached.
Testuje apps/majordomus-cli/tests/cli_examples.rs, který spouští příkaz nad sestaveným programem a ověřuje, co stránka uvádí.
Odkud to pochází
Deklarováno jednou v apps/majordomus-cli/src/cli.rs: clap pro strukturu, typovaná metadata v Rustu vedle něj pro příklady. Tato stránka, majordomus mesh build-cache ensure --help, docs/generated/cli.md a docs/generated/cli.json jsou projekce této jediné deklarace.
Celá příkazová řádka na jedné stránce: stránka příkazové řádky registru. Životní cyklus úlohy (init, start, finish, doctor, ...) patří nástroji shell, jinému programu: Příkazy a jeho specifikace.