1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-14 11:00:10 +01:00

Merge branch 'notabug' into 'master'

import: add notabug.org, auto-detect gradle, add options for license and categories

See merge request !237
This commit is contained in:
Hans-Christoph Steiner 2017-03-27 19:55:44 +00:00
commit c3492ab153

View File

@ -105,6 +105,15 @@ def get_metadata_from_url(app, url):
app.WebSite = url
app.SourceCode = url + '/tree/HEAD'
app.IssueTracker = url + '/issues'
elif url.startswith('https://notabug.org/'):
projecttype = 'notabug'
if url.endswith('.git'):
url = url[:-4]
repo = url + '.git'
repotype = 'git'
app.SourceCode = url
app.IssueTracker = url + '/issues'
app.WebSite = ""
elif url.startswith('https://bitbucket.org/'):
if url.endswith('/'):
url = url[:-1]
@ -175,6 +184,10 @@ def main():
help="Project URL to import from.")
parser.add_argument("-s", "--subdir", default=None,
help="Path to main android project subdirectory, if not in root.")
parser.add_argument("-c", "--categories", default=None,
help="Comma separated list of categories.")
parser.add_argument("-l", "--license", default=None,
help="Overall license of the project.")
parser.add_argument("--rev", default=None,
help="Allows a different revision (or git branch) to be specified for the initial import")
metadata.add_metadata_arguments(parser)
@ -262,8 +275,14 @@ def main():
build.versionCode = versionCode or '?'
if options.subdir:
build.subdir = options.subdir
if options.license:
app.License = options.license
if options.categories:
app.Categories = options.categories
if os.path.exists(os.path.join(root_dir, 'jni')):
build.buildjni = ['yes']
if os.path.exists(os.path.join(root_dir, 'build.gradle')):
build.gradle = ['yes']
metadata.post_metadata_parse(app)