pkgwatch/src/main.rs
Austin Schaefer b373881c86 Add systemd timer and desktop notifications
Hourly user-level pkgwatch.timer/.service, an OnFailure= notifier, and a
notifier module that sends notify-send alerts when a tier 4-6 release is
queued for review or a tier 1-3 release is published.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 09:45:26 +02:00

34 lines
1.1 KiB
Rust

//! Entry point: parses `argv` and dispatches to `pipeline`. Nothing here
//! makes a network/subprocess call or contains a decision worth a test —
//! see docs/ARCHITECTURE.md > "main is a dispatcher, not the program."
mod builder;
mod checker;
mod config;
mod fetcher;
mod github;
mod hash;
mod notifier;
mod pipeline;
mod publisher;
mod sanity;
mod state;
#[cfg(test)]
mod test_support;
mod verifier;
use anyhow::{Result, bail};
/// check -> fetch -> verify -> build -> sanity-check -> publish, for
/// whatever is in packages.d/. Tier 1-3 passes auto-publish; tier 4-6
/// passes queue for `pkgwatch review`. See docs/SPEC.md > Architecture for what
/// each stage does, and docs/ARCHITECTURE.md for how the code implementing it
/// is organized.
fn main() -> Result<()> {
let args: Vec<String> = std::env::args().skip(1).collect();
match args.first().map(String::as_str) {
None => pipeline::run_check(),
Some("review") => pipeline::run_review(&args[1..]),
Some(other) => bail!("unknown subcommand '{other}' (expected: review)"),
}
}