mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00: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 @@ API when using a GitHub token")
|
||||||
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…
Add table
Add a link
Reference in a new issue