diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2026-03-04 21:48:22 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2026-03-10 22:53:54 +0100 |
| commit | 78ddf62bfe2264c0085fdce4b2cbcad07f6eaf16 (patch) | |
| tree | 480f058d1672b0578e4aacac6de77b992bf63eaa /tests/import | |
| parent | feb52586ecabbde4c5003e106e0a8dd4b9a3add9 (diff) | |
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>
Diffstat (limited to 'tests/import')
| -rw-r--r-- | tests/import/utils.scm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/import/utils.scm b/tests/import/utils.scm index b631ba23268..c82fef78ec7 100644 --- a/tests/import/utils.scm +++ b/tests/import/utils.scm @@ -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") |
