summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2016-07-01 16:46:10 +0200
committerMathieu Lirzin <mthl@gnu.org>2016-07-01 16:46:10 +0200
commitca6b5d66772476c273ceef4cfe3a15c883ae34cc (patch)
treec6f96a5ff9e7120084fbd88656854d836961863b /bin
parentefef5c29c8edc7d0ed1b1c3e0a4c8d0b4ee009f4 (diff)
downloadcuirass-ca6b5d66772476c273ceef4cfe3a15c883ae34cc.tar
cuirass-ca6b5d66772476c273ceef4cfe3a15c883ae34cc.tar.gz
job: Add 'commit' and 'tag' field to <job-spec>.
Diffstat (limited to 'bin')
-rw-r--r--bin/cuirass.in8
1 files changed, 6 insertions, 2 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."