1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! Concrete [`Action`](repolith_core::action::Action) implementations
//! for repolith.
//!
//! Each backend lives behind its own cargo feature so consumers only
//! pull the dependencies they actually need:
//!
//! | Feature | Module | What it does |
//! |----------|---------------------------------|------------------------------------------------------|
//! | `git` | [`git_clone::GitClone`] | shells out to `git clone` / `git fetch` |
//! | `cargo` | [`cargo_install::CargoInstall`] | shells out to `cargo install --bin <name> --locked` |
//! | `docker` | [`docker::DockerBuild`] | shells out to `docker build -f … -t … -- <context>` |
//!
//! Every action shells out to an external CLI rather than linking the
//! corresponding library (no `git2`, no `cargo` as a crate). Two reasons:
//! faster compile times, and the host already has the CLIs by hypothesis
//! (you can't run `repolith sync` without `git` and `cargo` on `PATH`).
//!
//! Every spawned subprocess is raced against `ctx.cancel` via the
//! shared `util::run_with_cancel` helper so the orchestrator's
//! `FailFast` mode can short-circuit a long-running clone or build.
//! New actions that shell out should go through the same helper.
//!
//! See [`CONTRIBUTING.md`](https://github.com/anatta-rs/repolith/blob/main/CONTRIBUTING.md)
//! for the recipe to add a new action.
pub
/// Path utilities (tilde expansion). Public so the manifest factory in the
/// CLI can apply the same expansion to `node.path` that `cargo_install`
/// already applies to `install_to`.
/// `GitClone` action — mirror a remote git repository into a local path.
/// `CargoInstall` action — `cargo install` a binary crate from git or path.
/// `DockerBuild` action — `docker build` an image from the node's checkout.