From 95575ede22354e822e9d1467534ee10d3df57939 Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Tue, 3 Apr 2012 21:13:51 +0100 Subject: [PATCH] Import support for bare git:// protocol --- docs/fdroid.texi | 5 ++++- fdroidserver/import.py | 9 ++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/fdroid.texi b/docs/fdroid.texi index 72c84a0d..2c79beb7 100644 --- a/docs/fdroid.texi +++ b/docs/fdroid.texi @@ -346,11 +346,14 @@ Google Code - @code{http://code.google.com/p/PROJECT/} (supports git, svn and hg repos) @item Bitbucket - @code{https://bitbucket.org/USER/PROJECT/} +@item +Git - @code{git://REPO} @end enumerate Depending on the project type, more or less information may be gathered. For example, the license will be retrieved from a Google Code project, but not a -GitHub one. +GitHub one. A bare repo url, such as the git:// one, is the least preferable +optional of all, since you will have to enter much more information manually. If the import is successful, a metadata file will be created. You will need to edit this further to check the information, and fill in the blanks. diff --git a/fdroidserver/import.py b/fdroidserver/import.py index 6bf1516c..6956e02c 100644 --- a/fdroidserver/import.py +++ b/fdroidserver/import.py @@ -57,6 +57,13 @@ def main(): projecttype = None issuetracker = None license = None + website = url #by default, we might override it + if url.startswith('git://'): + projecttype = 'git' + repo = url + repotype = 'git' + sourcecode = "" + website = "" if url.startswith('https://github.com'): if url.endswith('/'): url = url[:-1] @@ -211,7 +218,7 @@ def main(): # Construct the metadata... app = common.parse_metadata(None) app['id'] = package - app['Web Site'] = url + app['Web Site'] = website app['Source Code'] = sourcecode if issuetracker: app['Issue Tracker'] = issuetracker -- 2.30.2