refactor: use engine in main

Also introduce exit codes: 0 for success, 1 for problem in the
repository under test, 2 for engine problem.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
Lars Wirzenius
2024-01-16 19:20:27 +02:00
parent 52ba6a9081
commit 211bb3a7d1
6 changed files with 43 additions and 420 deletions
+1 -5
View File
@@ -3,8 +3,7 @@ use std::path::PathBuf;
use radicle_ci_broker::msg::{MessageError, Request, Response, RunId, RunResult};
use crate::{
config::ConfigError, logfile::LogError, report, runcmd::RunCmdError, runinfo::RunInfoError,
runspec::RunSpecError,
config::ConfigError, logfile::LogError, report, runinfo::RunInfoError, runspec::RunSpecError,
};
/// Read a request from stdin.
@@ -81,9 +80,6 @@ pub enum NativeMessageError {
#[error(transparent)]
Report(#[from] report::ReportError),
#[error(transparent)]
RunCmd(#[from] RunCmdError),
#[error(transparent)]
RunInfo(#[from] RunInfoError),