[sysadmin-bin] Make sure both GitLab and Git repository locations are taken into account
- From: Andrea Veri <averi src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Make sure both GitLab and Git repository locations are taken into account
- Date: Fri, 27 Apr 2018 14:28:52 +0000 (UTC)
commit 59835709947b51c79d0aa9785ef0d9958b5dbe57
Author: Andrea Veri <averi redhat com>
Date: Fri Apr 27 16:27:34 2018 +0200
Make sure both GitLab and Git repository locations are taken into account
ftpadmin | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/ftpadmin b/ftpadmin
index fa43b99..5221e8e 100755
--- a/ftpadmin
+++ b/ftpadmin
@@ -297,7 +297,7 @@ class DOAP(BasicInfo):
DOAP_URL = 'https://git.gnome.org/repositories.doap'
DOAP_CACHE = '/ftp/cache/doap.json'
- GNOME_REPO = 'git://git.gnome.org/'
+ GITLAB_REPO = 'ssh://git gitlab gnome org'
TARBALL_PATH_PREFIX = '/sources/'
TARBALL_HOSTNAME_SUFFIX = '.gnome.org'
@@ -404,8 +404,12 @@ class DOAP(BasicInfo):
if isinstance(repo, semi_rdf.Node):
repo_loc = repo.find_property((self.NS_DOAP, u'location'))
- if hasattr(repo_loc, 'startswith') and repo_loc.startswith(self.GNOME_REPO):
- modname = repo_loc[len(self.GNOME_REPO):]
+ if hasattr(repo_loc, 'startswith'):
+ if repo_loc.startswith(self.GITLAB_REPO):
+ modname = re.sub('ssh://git gitlab gnome org:(GNOME|Infrastructure)/', '', repo_loc)
+ modname = re.sub('\.git$', '', modname)
+ else:
+ modname = re.sub('ssh://git.gnome.org/git/', '', repo_loc)
# In case project is unknown or already defined, ignore it
if not modname or modname in MODULE_INFO:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]