mirror of
https://seed.radicle.dev/rad:z3qg5TKmN83afz2fj9z3fQjU8vaYE.git
synced 2026-11-04 02:41:01 +08:00
+6
-6
@@ -52,19 +52,19 @@ fn fallible_main() -> Result<(), NativeError> {
|
||||
info!("radicle-native-ci starts");
|
||||
|
||||
let config = Config::load_via_env()?;
|
||||
let mut logfile = config.open_log()?;
|
||||
|
||||
let result = fallible_main_inner(&config);
|
||||
let result = fallible_main_inner(&config, &mut logfile);
|
||||
logfile.write_str("update report page\n")?;
|
||||
report::build_report(&config.state)?;
|
||||
logfile.write(format!("radicle-native-ci ends: {:?}\n", result))?;
|
||||
result
|
||||
}
|
||||
|
||||
fn fallible_main_inner(config: &Config) -> Result<(), NativeError> {
|
||||
fn fallible_main_inner(config: &Config, logfile: &mut LogFile) -> Result<(), NativeError> {
|
||||
pretty_env_logger::init_custom_env("RADICLE_NATIVE_CI_LOG");
|
||||
info!("radicle-native-ci starts");
|
||||
|
||||
let mut logfile = config.open_log()?;
|
||||
logfile.write_str("radicle-native-ci starts\n")?;
|
||||
|
||||
let (run_id, run_dir) = mkdir_run(config)?;
|
||||
let run_id = RunId::from(format!("{}", run_id).as_str());
|
||||
logfile.write(format!("run directory {}\n", run_dir.display()))?;
|
||||
@@ -88,7 +88,7 @@ fn fallible_main_inner(config: &Config) -> Result<(), NativeError> {
|
||||
repo,
|
||||
commit,
|
||||
&src,
|
||||
&mut logfile,
|
||||
logfile,
|
||||
&run_log,
|
||||
&config.state,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user