| |
.map_err(|e| NativeError::CreateLog(log_filename.into(), e))?,
|
| |
);
|
| |
|
| - |
logmsg(log_filename, &mut log, "=== Radicle native CI\n".into())?;
|
| + |
logmsg(log_filename, &mut log, "# Radicle native CI\n".into())?;
|
| |
logmsg(
|
| |
log_filename,
|
| |
&mut log,
|
| - |
format!("=== Repository id: {}\n", repo),
|
| + |
format!("# Repository id: {}\n", repo),
|
| |
)?;
|
| - |
logmsg(log_filename, &mut log, format!("=== Commit: {}\n", commit))?;
|
| + |
logmsg(log_filename, &mut log, format!("# Commit: {}\n", commit))?;
|
| |
|
| |
write_response(&Response::triggered(RunId::from(
|
| |
run_id.to_string().as_str(),
|
| |
},
|
| |
)
|
| |
.map_err(|e| NativeError::PopenCreate(format!("{:?}", argv), e))?;
|
| + |
logmsg(
|
| + |
log_filename,
|
| + |
log,
|
| + |
format!(
|
| + |
"# Run command\n\nCommand:\n~~~\n{:?}\n~~~\n\nOutput:\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
|
| + |
argv
|
| + |
),
|
| + |
)?;
|
| |
p.communicate(None)
|
| |
.map_err(|e| NativeError::ChildComms(format!("{:?}", argv), e))?;
|
| |
let exit = p
|
| |
.wait()
|
| |
.map_err(|e| NativeError::PopenFailed(format!("{:?}", argv), e))?;
|
| |
debug!("exit: {:?}", exit);
|
| - |
logmsg(log_filename, log, "...\n".into())?;
|
| + |
logmsg(
|
| + |
log_filename,
|
| + |
log,
|
| + |
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n\n".into(),
|
| + |
)?;
|
| + |
|
| |
if !exit.success() {
|
| |
let error = Response::error(&format!("command failed: {:?}", argv));
|
| |
error
|