Skip to content

Commit 52f2baf

Browse files
authored
add support for self-hosted gitlab instances (#631)
* support parsing repository urls that require auth * add support for self-hosted gitlab instances * be more explicit when parsing url * bump version to 0.1.19 closes #630
1 parent 68a0005 commit 52f2baf

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and **Merged pull requests**. Critical items to know are:
1414
The versions coincide with releases on pip. Only major versions will be released as tags on Github.
1515

1616
## [0.0.x](https://github.com/singularityhub/singularity-hpc/tree/main) (0.0.x)
17+
- Support for remote registries on self-hosted Gitlab instances (0.1.19)
1718
- Support for uninstall and fixing bug in biocontainers install (0.1.18)
1819
- GitHub action to update a registry from a cache or listing (0.1.17)
1920
- Support for "remove" command to more easily remove / uninstall entries

shpc/main/registry/remote.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,18 @@ def web_url(self):
106106
"""
107107
Retrieve the web url, either pages or (eventually) custom.
108108
"""
109-
parts = self.source_url.split("/")[3:]
110-
return "https://%s.%s.io/%s/library.json" % (
111-
parts[0],
112-
self.provider_name,
113-
"/".join(parts[1:]),
109+
domain, namespace, repo = self.source_url.split("/")[2:]
110+
domain_parts = domain.split('@')[-1].split(".")
111+
112+
if len(domain_parts) == 2:
113+
domain_parts[1] = "io"
114+
else:
115+
domain_parts.insert(0, "pages")
116+
117+
return "https://%s.%s/%s/library.json" % (
118+
namespace,
119+
".".join(domain_parts),
120+
repo,
114121
)
115122

116123
def exists(self, name):

shpc/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
__copyright__ = "Copyright 2021-2023, Vanessa Sochat"
33
__license__ = "MPL 2.0"
44

5-
__version__ = "0.1.18"
5+
__version__ = "0.1.19"
66
AUTHOR = "Vanessa Sochat"
77
88
NAME = "singularity-hpc"

0 commit comments

Comments
 (0)