diff options
-rw-r--r-- | bin/cuirass.in | 8 | ||||
-rw-r--r-- | src/cuirass/job.scm | 11 | ||||
-rw-r--r-- | tests/hello-subset.scm | 7 |
3 files changed, 21 insertions, 5 deletions
diff --git a/bin/cuirass.in b/bin/cuirass.in index e1ce5e6..f0ea3a7 100644 --- a/bin/cuirass.in +++ b/bin/cuirass.in @@ -61,12 +61,16 @@ DIR if required." (with-directory-excursion cachedir (let ((name (job-spec-name spec)) (url (job-spec-url spec)) - (branch (job-spec-branch spec))) + (branch (job-spec-branch spec)) + (commit (job-spec-commit spec)) + (tag (job-spec-tag spec))) (or (file-exists? name) (system* "git" "clone" url name)) (with-directory-excursion name (and (zero? (system* "git" "fetch")) (zero? (system* "git" "reset" "--hard" - (string-append "origin/" branch)))))))) + (or tag + commit + (string-append "origin/" branch))))))))) (define (evaluate store db cachedir spec) "Evaluate and build package derivations. Return a list a jobs." diff --git a/src/cuirass/job.scm b/src/cuirass/job.scm index 48c49b4..2e2c304 100644 --- a/src/cuirass/job.scm +++ b/src/cuirass/job.scm @@ -33,6 +33,8 @@ job-spec-name job-spec-url job-spec-branch + job-spec-commit + job-spec-tag job-spec-file job-spec-proc job-spec-arguments)) @@ -56,14 +58,17 @@ metadata))))) (define-record-type <job-spec> - (%make-job-spec name url branch file proc arguments) + (%make-job-spec name url branch commit file proc arguments) job-spec? (name job-spec-name) ;string (url job-spec-url) ;string (branch job-spec-branch) ;string + (commit job-spec-commit) ;string + (tag job-spec-tag) ;string (file job-spec-file) ;string (proc job-spec-proc) ;symbol (arguments job-spec-arguments)) ;alist -(define* (make-job-spec #:key name url branch file proc arguments) - (%make-job-spec name url branch file proc arguments)) +(define* (make-job-spec #:key name url commit tag file proc arguments + (branch "master")) + (%make-job-spec name url branch tag file proc arguments)) diff --git a/tests/hello-subset.scm b/tests/hello-subset.scm index 7139d95..b270ded 100644 --- a/tests/hello-subset.scm +++ b/tests/hello-subset.scm @@ -37,4 +37,11 @@ #:branch "core-updates" #:file (local-file "gnu-system.scm") #:proc 'hydra-jobs + #:arguments '((subset . "hello"))) + (make-job-spec + #:name "guix" + #:url "git://git.savannah.gnu.org/guix.git" + #:tag "v0.9.0" + #:file (local-file "gnu-system.scm") + #:proc 'hydra-jobs #:arguments '((subset . "hello")))) |