From 9f2890c2deb626d0c50cdcc22ba3a3c81da20272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Barroso=20Galindo?= Date: Sat, 17 Dec 2022 17:20:52 +0100 Subject: [PATCH] Fixing repository name extraction --- .github/download_distribution.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/download_distribution.py b/.github/download_distribution.py index e44cb6e4e..982223ab7 100755 --- a/.github/download_distribution.py +++ b/.github/download_distribution.py @@ -607,7 +607,7 @@ def collect_cheat_zips(url): return [f[f.find('mister_'):f.find('.zip') + 4] for f in text.splitlines() if 'mister_' in f and '.zip' in f] def download_mister_devel_repository(input_url, delme, category): - name = input_url.rsplit('/', 1)[-1] + name = get_repository_name(input_url) name, branch = get_branch(name) path = f'{delme}/{name}' @@ -622,6 +622,9 @@ def download_mister_devel_repository(input_url, delme, category): download_repository(path, git_url, branch) return path +def get_repository_name(input_url): + return str(Path(urlparse(input_url).path.split('/')[2]).with_suffix('')) + # file system utilities def get_branch(name):