mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 06:06:53 -05:00
import: github: Sort releases before picking the latest one.
* guix/import/github.scm (latest-released-version): Sort releases before picking the first one as the latest.
This commit is contained in:
parent
c558772b0f
commit
06c7b1f614
1 changed files with 7 additions and 4 deletions
|
@ -206,10 +206,13 @@ (define (release->version release)
|
||||||
API. This may be fixed by using an access token and setting the environment
|
API. This may be fixed by using an access token and setting the environment
|
||||||
variable GUIX_GITHUB_TOKEN, for instance one procured from
|
variable GUIX_GITHUB_TOKEN, for instance one procured from
|
||||||
https://github.com/settings/tokens"))
|
https://github.com/settings/tokens"))
|
||||||
(any release->version
|
(match (sort (filter-map release->version
|
||||||
(match (remove pre-release? json)
|
(match (remove pre-release? json)
|
||||||
(() json) ; keep everything
|
(() json) ; keep everything
|
||||||
(releases releases))))))
|
(releases releases)))
|
||||||
|
version>?)
|
||||||
|
((latest-release . _) latest-release)
|
||||||
|
(() #f)))))
|
||||||
|
|
||||||
(define (latest-release pkg)
|
(define (latest-release pkg)
|
||||||
"Return an <upstream-source> for the latest release of PKG."
|
"Return an <upstream-source> for the latest release of PKG."
|
||||||
|
|
Loading…
Reference in a new issue