diff options
-rw-r--r-- | forge/build/git.scm | 12 | ||||
-rw-r--r-- | forge/forge.scm | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/forge/build/git.scm b/forge/build/git.scm index 2e3dc41..444e3d6 100644 --- a/forge/build/git.scm +++ b/forge/build/git.scm @@ -34,7 +34,13 @@ ;;; Code: -(define (download-git-to-store store name url branch) +(define (hline) + "Print a horizontal line 50 '=' characters long." + (display (make-string 50 #\=)) + (newline) + (force-output)) + +(define* (download-git-to-store store name url branch #:key show-commit?) "Download BRANCH of git repository from URL to STORE under NAME and return store path. git and certificates should be in the environment." (call-with-temporary-directory @@ -48,6 +54,10 @@ return store path. git and certificates should be in the environment." (invoke-error-exit-status condition)) (exit #f))) (invoke "git" "clone" "--quiet" "--depth" "1" "--branch" branch url ".")) + (when show-commit? + (hline) + (invoke "git" "--no-pager" "log") + (hline)) (delete-file-recursively ".git")) (add-to-store store name #t "sha256" directory)))) diff --git a/forge/forge.scm b/forge/forge.scm index d3bb879..199c4c3 100644 --- a/forge/forge.scm +++ b/forge/forge.scm @@ -217,7 +217,8 @@ derivation to run." (run-with-store store (mlet* %store-monad ((git-checkout (latest-git-checkout #$git-checkout-name #$git-repository - #$git-branch)) + #$git-branch + #:show-commit? #t)) (tests-drv (gexp->derivation #$derivation-name (#$gexp-producer git-checkout) #:guile-for-build (read-derivation-from-file |