summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJonathon Anderson <17242663+blue42u@users.noreply.github.com>2024-05-17 12:43:13 -0400
committerGitHub <noreply@github.com>2024-05-17 18:43:13 +0200
commit6a40a50a2917430b448ed19af98fa2ec81af0be1 (patch)
tree39b8fba0b528859c258e35987710bf660c4c9d4b /lib
parentb2924f68c07ccb84f03c44f504f4c60c84ffd511 (diff)
downloadspack-6a40a50a2917430b448ed19af98fa2ec81af0be1.tar.gz
spack-6a40a50a2917430b448ed19af98fa2ec81af0be1.tar.bz2
spack-6a40a50a2917430b448ed19af98fa2ec81af0be1.tar.xz
spack-6a40a50a2917430b448ed19af98fa2ec81af0be1.zip
hpcviewer: Update URLs to use GitLab release assets (#44129)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/test/url_parse.py7
-rw-r--r--lib/spack/spack/url.py2
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/spack/spack/test/url_parse.py b/lib/spack/spack/test/url_parse.py
index 2a3e3e7e72..00591b2f37 100644
--- a/lib/spack/spack/test/url_parse.py
+++ b/lib/spack/spack/test/url_parse.py
@@ -87,6 +87,13 @@ def test_url_strip_name_suffixes(url, version, expected):
59,
"https://github.com/nextflow-io/nextflow/releases/download/v0.20.1/nextflow",
),
+ (
+ "hpcviewer",
+ 30,
+ "2024.02",
+ 51,
+ "https://gitlab.com/hpctoolkit/hpcviewer/-/releases/2024.02/downloads/hpcviewer.tgz",
+ ),
# Version in stem
("zlib", 24, "1.2.10", 29, "http://zlib.net/fossils/zlib-1.2.10.tar.gz"),
(
diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py
index e9f89b02f1..e81eca22f7 100644
--- a/lib/spack/spack/url.py
+++ b/lib/spack/spack/url.py
@@ -258,7 +258,9 @@ def parse_version_offset(path):
# 9th Pass: Version in path
# github.com/repo/name/releases/download/vver/name
# e.g. https://github.com/nextflow-io/nextflow/releases/download/v0.20.1/nextflow
+ # e.g. https://gitlab.com/hpctoolkit/hpcviewer/-/releases/2024.02/downloads/hpcviewer.tgz
(r"github\.com/[^/]+/[^/]+/releases/download/[a-zA-Z+._-]*v?(\d[\da-zA-Z._-]*)/", path),
+ (r"gitlab\.com/[^/]+/.+/-/releases/[a-zA-Z+._-]*v?(\d[\da-zA-Z._-]*)/downloads/", path),
# e.g. ftp://ftp.ncbi.nlm.nih.gov/blast/executables/legacy.NOTSUPPORTED/2.2.26/ncbi.tar.gz
(r"(\d[\da-zA-Z._-]*)/[^/]+$", path),
]