Files
radicle-ci-broker/adapterlib/examples/adapter.rs
T
Lars Wirzenius 0e7ddc020f feat: add a sub-crate with things needed by an adapter implement in Rust
Move radicle_ci_broker::msg::* to radicle_ci_adapter::*. This is meant
to make building adapters in Rust to build much faster, as they only
need to build new radicle_ci_adapter crate, not the whole of
radicle_ci_broker.
2026-07-14 10:22:34 +03:00

31 lines
624 B
Rust

//! A dummy adapter for Radicle CI.
use tempfile::tempdir;
use radicle_ci_adapter::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let request = read_request()?; // Read request.
eprintln!("{request:#?}\n");
let run_id = RunId::default();
let info_url = "https://liw.fi";
write_triggered(&run_id, Some(info_url))?;
let mut adminlog = AdminLog::default();
let tmp = tempdir()?;
get_sources(
&mut adminlog,
false,
request.repo(),
request.commit()?,
tmp.path(),
)?;
eprintln!("got sources!");
write_succeeded()?;
Ok(())
}