guix build: '--with-commit' recognizes "v[0-9]" tags.
* guix/scripts/build.scm (transform-package-source-commit)[replace]: Special case COMMIT that starts with "v[0-9]".
This commit is contained in:
parent
10a8c2bbc6
commit
4d04bc50d2
|
@ -341,10 +341,15 @@ strings like \"guile-next=cabba9e\" meaning that packages are built using
|
||||||
(define (replace old url commit)
|
(define (replace old url commit)
|
||||||
(package
|
(package
|
||||||
(inherit old)
|
(inherit old)
|
||||||
(version (string-append "git."
|
(version (if (and (> (string-length commit) 1)
|
||||||
(if (< (string-length commit) 7)
|
(string-prefix? "v" commit)
|
||||||
commit
|
(char-set-contains? char-set:digit
|
||||||
(string-take commit 7))))
|
(string-ref commit 1)))
|
||||||
|
(string-drop commit 1) ;looks like a tag like "v1.0"
|
||||||
|
(string-append "git."
|
||||||
|
(if (< (string-length commit) 7)
|
||||||
|
commit
|
||||||
|
(string-take commit 7)))))
|
||||||
(source (git-checkout (url url) (commit commit)
|
(source (git-checkout (url url) (commit commit)
|
||||||
(recursive? #t)))))
|
(recursive? #t)))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue