mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
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
This commit is contained in:
@@ -374,7 +374,6 @@ GLib and GIO. It was started as a complete rewrite of the former Xfce menu
|
|||||||
library called libxfce4menu, which, in contrast to garcon, was lacking menu
|
library called libxfce4menu, which, in contrast to garcon, was lacking menu
|
||||||
merging features essential for loading menus modified with menu editors.")
|
merging features essential for loading menus modified with menu editors.")
|
||||||
(license lgpl2.0+)
|
(license lgpl2.0+)
|
||||||
;; FIXME: the 'generic-git' updater treat "rc" as pre-releases.
|
|
||||||
(properties `((release-tag-prefix . ,(string-append name "-"))))))
|
(properties `((release-tag-prefix . ,(string-append name "-"))))))
|
||||||
|
|
||||||
(define-public tumbler
|
(define-public tumbler
|
||||||
@@ -915,7 +914,6 @@ and import the new pictures from your camera.")
|
|||||||
(description "The Thunar Archive Plugin allows you to create and extract
|
(description "The Thunar Archive Plugin allows you to create and extract
|
||||||
archive files using the file context menus in the Thunar file manager.")
|
archive files using the file context menus in the Thunar file manager.")
|
||||||
(license gpl2+)
|
(license gpl2+)
|
||||||
;; FIXME: the 'generic-git' updater treat "rc" as pre-releases.
|
|
||||||
(properties `((release-tag-prefix . ,(string-append name "-"))))))
|
(properties `((release-tag-prefix . ,(string-append name "-"))))))
|
||||||
|
|
||||||
(define-public thunar-shares-plugin
|
(define-public thunar-shares-plugin
|
||||||
@@ -2438,5 +2436,4 @@ local weather in the panel, using forecast data provided by the
|
|||||||
developers and people that want to build Xfce from Git In addition it contains
|
developers and people that want to build Xfce from Git In addition it contains
|
||||||
the Xfce developer's handbook.")
|
the Xfce developer's handbook.")
|
||||||
(license gpl2+)
|
(license gpl2+)
|
||||||
;; FIXME: the 'generic-git' updater treat "dev" as pre-releases.
|
|
||||||
(properties `((release-tag-prefix . ,(string-append name "-"))))))
|
(properties `((release-tag-prefix . ,(string-append name "-"))))))
|
||||||
|
|||||||
@@ -138,9 +138,16 @@ version corresponding to the tag, and the cdr is the name of the tag."
|
|||||||
(define (entry<? a b)
|
(define (entry<? a b)
|
||||||
(eq? (version-compare (car a) (car 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)
|
(stable-sort (filter-map (lambda (tag)
|
||||||
(let ((version (get-version tag)))
|
(let ((version (get-version tag)))
|
||||||
(and version (cons version tag))))
|
(and version
|
||||||
|
(or pre-releases?
|
||||||
|
(not (pre-release? version)))
|
||||||
|
(cons version tag))))
|
||||||
tags)
|
tags)
|
||||||
entry<?))
|
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
|
"Return the latest version and corresponding tag available from the Git
|
||||||
repository at URL. Optionally include a VERSION string to fetch a specific
|
repository at URL. Optionally include a VERSION string to fetch a specific
|
||||||
version."
|
version."
|
||||||
(define (pre-release? tag)
|
|
||||||
(any (cut regexp-exec <> tag)
|
|
||||||
%pre-release-rx))
|
|
||||||
|
|
||||||
(let* ((tags (map (cut string-drop <> (string-length "refs/tags/"))
|
(let* ((tags (map (cut string-drop <> (string-length "refs/tags/"))
|
||||||
(remote-refs url #:tags? #t)))
|
(remote-refs url #:tags? #t)))
|
||||||
(versions->tags
|
(versions->tags
|
||||||
(version-mapping (if pre-releases?
|
(version-mapping tags
|
||||||
tags
|
|
||||||
(filter (negate pre-release?) tags))
|
|
||||||
#:prefix prefix
|
#:prefix prefix
|
||||||
#:suffix suffix
|
#:suffix suffix
|
||||||
#:delim delim
|
#:delim delim
|
||||||
|
|||||||
@@ -224,4 +224,13 @@
|
|||||||
(let ((package (make-package directory "1.0.0")))
|
(let ((package (make-package directory "1.0.0")))
|
||||||
(latest-git-tag-version package))))
|
(latest-git-tag-version package))))
|
||||||
|
|
||||||
|
(test-equal "latest-git-tag-version: prefix contains pre-release words"
|
||||||
|
"1.0.1"
|
||||||
|
(with-temporary-git-repository directory
|
||||||
|
'((add "a.txt" "A")
|
||||||
|
(commit "First commit")
|
||||||
|
(tag "libdevx-1.0.1" "Release 1.0.1"))
|
||||||
|
(let ((package (make-package directory "1.0.0")))
|
||||||
|
(latest-git-tag-version package))))
|
||||||
|
|
||||||
(test-end "git")
|
(test-end "git")
|
||||||
|
|||||||
Reference in New Issue
Block a user