gw_bin/
lib.rs

1//! Watch local git repositories, keep in sync with remote and run commands.
2//!
3//! ## How it works
4//!
5//! `gw` is built up from **triggers**, **checks** and **actions**.
6//! Triggers are long running background processes that initiates checks
7//! (for example periodic triggers, or HTTP triggers). Checks tests
8//! if there are any changes in the directory (be it git or filesystem changes)
9//! and runs the actions if there was. Actions are arbitrary code that runs
10//! (e.g. user-defined shell scripts).
11//!
12//! ```ignore
13//! +---------+       +--------+       +--------+
14//! | trigger | ----> | checks | ----> | action |
15//! +---------+       +--------+       +--------+
16//! ```
17//!
18
19/// An action is a process that runs if any changes occured (e.g. [running actions](actions::script::ScriptAction)).
20pub mod actions;
21/// A check is a process that tests if there are any changes and updates it.
22pub mod checks;
23/// A trigger is a long running background process, which initiates the checks
24/// (e.g. [on a schedule](triggers::schedule::ScheduleTrigger), [on HTTP request](triggers::http::HttpTrigger)
25/// or [once](triggers::once::OnceTrigger)).
26pub mod triggers;
27
28/// The main program loop, that runs the triggers, checks and actions infinitely.
29pub mod start;
30
31/// The context which can share data between the different steps.
32pub mod context;