Radish alpha
r
rad:z3qg5TKmN83afz2fj9z3fQjU8vaYE
Radicle CI adapter for native CI
Radicle
Git
feat: run "git show" to show the commit being built
Lars Wirzenius committed 2 years ago
commit 89f0b970e33e9fec7db81660a48e8b182161938b
parent 8c74e71
1 file changed +6 -0
modified src/run.rs
@@ -135,6 +135,7 @@ impl Run {
        let src = self.src.to_path_buf();
        self.git_clone(&repo_path, &src)?;
        self.git_checkout(commit, &src)?;
+
        self.git_show(commit, &src)?;

        let runspec_path = self.src.join(RUNSPEC_PATH);
        let runspec = match RunSpec::from_file(&runspec_path) {
@@ -181,6 +182,11 @@ impl Run {
        Ok(())
    }

+
    fn git_show(&mut self, commit: Oid, src: &Path) -> Result<(), RunError> {
+
        self.runcmd(&["git", "show", &commit.to_string()], src)?;
+
        Ok(())
+
    }
+

    // Run an external command in a directory. Log the command and the
    // result of running it to the run log. Return an error if the
    // command could not be executed at all, but the exit code if it