me
/
guix
Archived
1
0
Fork 0

import: github: Recognize more URLs.

Fixes <https://issues.guix.gnu.org/66396>.

This allows more packages to be refreshed, such as launchmon, love,
retux, preseq, edgar, antlr3, and runc.

* guix/import/github.scm (updated-github-url)[updated-url]: Add
additional heuristics to Github url updater.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Change-Id: I6409b3f61872a954f53480afd63b307d16d0b9c0
master
Giacomo Leidi 2023-10-07 21:45:11 +02:00 committed by Ludovic Courtès
parent c872b3bc39
commit 320f28390f
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 7 additions and 0 deletions

View File

@ -6,6 +6,7 @@
;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
;;;
;;; This file is part of GNU Guix.
;;;
@ -24,6 +25,7 @@
(define-module (guix import github)
#:use-module (ice-9 match)
#:use-module (ice-9 regex)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
@ -96,6 +98,11 @@ false if none is recognized"
url)
(string-append prefix "/releases/download/" repo "-" new-version "/"
repo "-" new-version ext))
((string-match (string-append "/releases/download/(v)?" version "/"
name ".*" ext "$")
url)
(string-replace-substring url version new-version))
(#t #f))) ; Some URLs are not recognised.
#f))