summaryrefslogtreecommitdiff
path: root/guix/import
diff options
context:
space:
mode:
author宋文武 <iyzsong@member.fsf.org>2025-01-07 14:16:28 +0800
committer宋文武 <iyzsong@member.fsf.org>2025-01-12 14:18:03 +0800
commite74040b73cd38467e886ed9e2f1e1b351d13c2f2 (patch)
tree7a5f3885b290117802ec40c3d993d861d18596a7 /guix/import
parent11d0bdad961bb4924ee415607053b02c45817ab8 (diff)
import: git: Do not search pre-release words in tag prefix.
This fixes tags like 'xfce4-dev-tools-4.20.0'. * tests/import-git.scm ("latest-git-tag-version: prefix contains pre-release words"): New test. * guix/import/git.scm (latest-tag): Don't filter out pre-releases tags. (version-mapping): Filter out pre-releases tags from versions. * gnu/packages/xfce.scm (garcon, thunar-archive-plugin, xfce4-dev-tools): Remove FIXME comments for the 'generic-git' updater. Change-Id: I7683200fa451d7fad153aa08fa9d5761688de01d
Diffstat (limited to 'guix/import')
-rw-r--r--guix/import/git.scm17
1 files changed, 9 insertions, 8 deletions
diff --git a/guix/import/git.scm b/guix/import/git.scm
index ab51719255..305b2fc43f 100644
--- a/guix/import/git.scm
+++ b/guix/import/git.scm
@@ -138,9 +138,16 @@ version corresponding to the tag, and the cdr is the name of the tag."
(define (entry<? a b)
(eq? (version-compare (car a) (car b)) '<))
+ (define (pre-release? tag)
+ (any (cut regexp-exec <> tag)
+ %pre-release-rx))
+
(stable-sort (filter-map (lambda (tag)
(let ((version (get-version tag)))
- (and version (cons version tag))))
+ (and version
+ (or pre-releases?
+ (not (pre-release? version)))
+ (cons version tag))))
tags)
entry<?))
@@ -149,16 +156,10 @@ version corresponding to the tag, and the cdr is the name of the tag."
"Return the latest version and corresponding tag available from the Git
repository at URL. Optionally include a VERSION string to fetch a specific
version."
- (define (pre-release? tag)
- (any (cut regexp-exec <> tag)
- %pre-release-rx))
-
(let* ((tags (map (cut string-drop <> (string-length "refs/tags/"))
(remote-refs url #:tags? #t)))
(versions->tags
- (version-mapping (if pre-releases?
- tags
- (filter (negate pre-release?) tags))
+ (version-mapping tags
#:prefix prefix
#:suffix suffix
#:delim delim