From: Giacomo Leidi via Guix-patches via <guix-patches@gnu.org>
To: 66396@debbugs.gnu.org
Cc: Giacomo Leidi <goodoldpaul@autistici.org>
Subject: [bug#66396] [PATCH] guix: Add case to Github url updater.
Date: Sat, 7 Oct 2023 21:45:11 +0200 [thread overview]
Message-ID: <1ed23c30a7592facd1db4c28c0f3cfb908157d9e.1696707911.git.goodoldpaul@autistici.org> (raw)
* guix/import/github.scm (updated-github-url)[updated-url]: Add
additional heuristics to Github url updater.
---
guix/import/github.scm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/guix/import/github.scm b/guix/import/github.scm
index 7409c9a202..c5556d78ee 100644
--- a/guix/import/github.scm
+++ b/guix/import/github.scm
@@ -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 @@ (define (updated-github-url old-package new-version)
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))
base-commit: 00a28bc435606dc98925fbae1ebe314881f35c90
--
2.41.0
next reply other threads:[~2023-10-07 19:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-07 19:45 Giacomo Leidi via Guix-patches via [this message]
2023-10-23 21:55 ` [bug#66396] [PATCH] guix: Add case to Github url updater Ludovic Courtès
2023-10-23 22:05 ` paul via Guix-patches via
2023-12-03 22:03 ` paul via Guix-patches via
2024-02-07 0:50 ` paul via Guix-patches via
2024-04-17 9:12 ` bug#66396: " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1ed23c30a7592facd1db4c28c0f3cfb908157d9e.1696707911.git.goodoldpaul@autistici.org \
--to=guix-patches@gnu.org \
--cc=66396@debbugs.gnu.org \
--cc=goodoldpaul@autistici.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).