summaryrefslogtreecommitdiff
path: root/guix/git.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-09-04 19:07:52 +0200
committerMarius Bakke <marius@gnu.org>2021-09-08 18:03:50 +0200
commit16ef7b4938b14e68f8ca7504c9614f84530572ed (patch)
tree8e301c083c414d41875c4ab171bd90c7ee328b20 /guix/git.scm
parent1dc3825e9940de44c1f170add7bd26d61830ce34 (diff)
transformations: Git tags and 'git describe' style IDs are used as version.
* guix/transformations.scm (commit->version-string): New procedure. Use git tags and 'git describe' style identifiers directly. (transform-package-source-commit): Adjust accordingly. * tests/transformations.scm ("options->transformation, with-commit, version transformation"): New test. * doc/guix.texi (Package Transformation Options): Mention the 'git describe' style.
Diffstat (limited to 'guix/git.scm')
-rw-r--r--guix/git.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/guix/git.scm b/guix/git.scm
index 621de0e925..acc48fd12f 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -231,11 +231,11 @@ corresponding Git object."
(string-every char-set:digit revision)
(string-every char-set:hex-digit
(string-drop g+commit 1)))
+ ;; Looks like a 'git describe' style ID, like
+ ;; v1.3.0-7-gaa34d4d28d.
(string-drop g+commit 1)
#f))
(_ #f)))
- ;; Looks like a 'git describe' style ID, like
- ;; v1.3.0-7-gaa34d4d28d.
=> (lambda (commit) (resolve `(commit . ,commit))))
((or (> (string-length str) 40)
(not (string-every char-set:hex-digit str)))