Skip to content

Commit 05f8411

Browse files
committed
also fetch components
1 parent 756b026 commit 05f8411

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

cli/pkg/spec/next.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,17 @@ func RunSpecNext(
4343
}
4444

4545
// checking out to the commit ID
46+
log.Printf("fetching commit ID %v", spec.Job.Commit)
47+
fetchCmd := exec.Command("git", "fetch", "origin", spec.Job.Commit)
48+
fetchCmd.Stdout = os.Stdout
49+
fetchCmd.Stderr = os.Stderr
50+
err = fetchCmd.Run()
51+
if err != nil {
52+
log.Printf("error while fetching commit SHA: %v", err)
53+
reporterError(spec, backendApi, err)
54+
usage.ReportErrorAndExit(spec.VCS.Actor, fmt.Sprintf("error while checking out to commit sha: %v", err), 1)
55+
}
56+
4657
log.Printf("checking out to commit ID %v", spec.Job.Commit)
4758
cmd := exec.Command("git", "checkout", spec.Job.Commit)
4859
cmd.Stdout = os.Stdout

0 commit comments

Comments
 (0)