[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: import/github: Check for more version prefixes.
From: |
guix-commits |
Subject: |
01/01: import/github: Check for more version prefixes. |
Date: |
Fri, 20 Sep 2019 02:05:47 -0400 (EDT) |
efraim pushed a commit to branch master
in repository guix.
commit 3fd738f31b3fc6b31e048468980cc20c3d04261d
Author: Efraim Flashner <address@hidden>
Date: Tue Sep 17 21:50:36 2019 +0300
import/github: Check for more version prefixes.
* guix/import/github.scm (latest-released-version): Allow the
version string to begin with the word 'version'.
---
guix/import/github.scm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/guix/import/github.scm b/guix/import/github.scm
index 55ea00a..df5f6ff 100644
--- a/guix/import/github.scm
+++ b/guix/import/github.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2017, 2018, 2019 Ludovic Courtès <address@hidden>
;;; Copyright © 2018 Eric Bavier <address@hidden>
;;; Copyright © 2019 Arun Isaac <address@hidden>
+;;; Copyright © 2019 Efraim Flashner <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -186,7 +187,12 @@ the package e.g. 'bedtools2'. Return #f if there is no
releases"
(substring tag 0 (+ name-length 1))))
(substring tag (+ name-length 1)))
;; some tags start with a "v" e.g. "v0.25.0"
+ ;; or with the word "version" e.g. "version.2.1"
;; where some are just the version number
+ ((string-prefix? "version" tag)
+ (if (char-set-contains? char-set:digit (string-ref tag 7))
+ (substring tag 7)
+ (substring tag 8)))
((string-prefix? "v" tag)
(substring tag 1))
;; Finally, reject tags that don't start with a digit: