chiark / gitweb /
Add support for gitlab.com repos to import
authorDaniel Martí <mvdan@mvdan.cc>
Sun, 1 Jun 2014 14:37:33 +0000 (16:37 +0200)
committerDaniel Martí <mvdan@mvdan.cc>
Sun, 1 Jun 2014 14:37:33 +0000 (16:37 +0200)
fdroidserver/import.py

index b17bb4df01343edcce25300664ec7cd5384dd9c5..27b0c90bac758528a1306114b8e4dc060c9e3048 100644 (file)
@@ -138,13 +138,12 @@ def main():
         sourcecode = ""
         website = ""
     elif url.startswith('https://github.com'):
-        if url.endswith('/'):
-            url = url[:-1]
-        if url.endswith('.git'):
-            logging.info("A github URL should point to the project, not the git repo")
-            sys.exit(1)
         projecttype = 'github'
-        repo = url + '.git'
+        repotype = 'git'
+        sourcecode = url
+        issuetracker = url + '/issues'
+    elif url.startswith('https://gitlab.com/'):
+        projecttype = 'gitlab'
         repotype = 'git'
         sourcecode = url
         issuetracker = url + '/issues'