mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
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
1 changed files with 9 additions and 4 deletions
|
@ -341,10 +341,15 @@ (define (transform-package-source-commit replacement-specs)
|
|||
(define (replace old url commit)
|
||||
(package
|
||||
(inherit old)
|
||||
(version (string-append "git."
|
||||
(if (< (string-length commit) 7)
|
||||
commit
|
||||
(string-take commit 7))))
|
||||
(version (if (and (> (string-length commit) 1)
|
||||
(string-prefix? "v" commit)
|
||||
(char-set-contains? char-set:digit
|
||||
(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)
|
||||
(recursive? #t)))))
|
||||
|
||||
|
|
Loading…
Reference in a new issue