mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-23 09:35:56 +02:00
style: git-source: Handle more URLs.
* guix/import/utils.scm (tarball-url->git-repository-url): New procedure.
* guix/scripts/style.scm (url-fetch->git-fetch)[transform-source]: Add
‘repository-url’ parameter.
Use ‘tarball-url->git-repository-url’ when ‘home-page’ is not a Git URL.
(transform-to-git-fetch): Rename ‘home-page’ to ‘repository-url’.
* tests/import/utils.scm ("tarball-url->git-repository-url, guile"): New test.
* tests/style.scm ("url-fetch->git-fetch, mirror:// URL"): New test.
Change-Id: I4f8ca7c67a58f917d69380678b62c00962b0f9cd
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
@@ -344,4 +344,13 @@ error procedure has been called."
|
||||
(let ((sexp error-called? (test-generate-git-source "1.0.0" "2.0.0")))
|
||||
error-called?))
|
||||
|
||||
(test-equal "tarball-url->git-repository-url, guile"
|
||||
'("https://https.git.savannah.gnu.org/git/guile.git"
|
||||
"https://gitlab.gnome.org/GNOME/brasero.git"
|
||||
"https://github.com/aide/aide")
|
||||
(map tarball-url->git-repository-url
|
||||
'("mirror://gnu/guile/guile-3.0.11.tar.gz"
|
||||
"mirror://gnome/sources/brasero/3.12/brasero-3.12.3.tar.xz"
|
||||
"https://github.com/aide/aide/releases/download/v0.19.3/aide-0.19.3.tar.gz")))
|
||||
|
||||
(test-end "import-utils")
|
||||
|
||||
Reference in New Issue
Block a user