diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b9fb4953..62624dbf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and **Merged pull requests**. Critical items to know are: The versions coincide with releases on pip. Only major versions will be released as tags on Github. ## [0.0.x](https://github.com/singularityhub/singularity-hpc/tree/main) (0.0.x) + - Support for remote registries on self-hosted Gitlab instances (0.1.19) - Support for uninstall and fixing bug in biocontainers install (0.1.18) - GitHub action to update a registry from a cache or listing (0.1.17) - Support for "remove" command to more easily remove / uninstall entries diff --git a/shpc/main/registry/remote.py b/shpc/main/registry/remote.py index 2680243fe..7b9af3ddc 100644 --- a/shpc/main/registry/remote.py +++ b/shpc/main/registry/remote.py @@ -106,11 +106,18 @@ def web_url(self): """ Retrieve the web url, either pages or (eventually) custom. """ - parts = self.source_url.split("/")[3:] - return "https://%s.%s.io/%s/library.json" % ( - parts[0], - self.provider_name, - "/".join(parts[1:]), + domain, namespace, repo = self.source_url.split("/")[2:] + domain_parts = domain.split('@')[-1].split(".") + + if len(domain_parts) == 2: + domain_parts[1] = "io" + else: + domain_parts.insert(0, "pages") + + return "https://%s.%s/%s/library.json" % ( + namespace, + ".".join(domain_parts), + repo, ) def exists(self, name): diff --git a/shpc/version.py b/shpc/version.py index a6e70e5c1..336ce8b21 100644 --- a/shpc/version.py +++ b/shpc/version.py @@ -2,7 +2,7 @@ __copyright__ = "Copyright 2021-2023, Vanessa Sochat" __license__ = "MPL 2.0" -__version__ = "0.1.18" +__version__ = "0.1.19" AUTHOR = "Vanessa Sochat" EMAIL = "vsoch@users.noreply.github.com" NAME = "singularity-hpc"