Radish alpha
r
Radicle CI adapter for native CI
Radicle
Git (anonymous pull)
Log in to clone via SSH
feat: remove source tree on successful run
Lars Wirzenius committed 2 years ago
commit 28a93105a3bb4654ee5dc167b096da4cbb0bb551
parent a5e8bfed79cef07a2116addd9b6c45aff3e02a8d
1 file changed +5 -0
modified src/main.rs
@@ -156,6 +156,8 @@ fn run(

    run_log.write("CI run finished successfully\n".into())?;

+
    std::fs::remove_dir_all(src).map_err(|e| NativeError::RemoveDir(src.into(), e))?;
+

    Ok(())
}

@@ -335,4 +337,7 @@ enum NativeError {

    #[error("failed to write to log file {0}")]
    WriteLogFile(PathBuf, #[source] std::io::Error),
+

+
    #[error("failed to remove {0}")]
+
    RemoveDir(PathBuf, #[source] std::io::Error),
}