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

nightly: create app metadata using template of parsed data

This commit is contained in:
Hans-Christoph Steiner 2017-12-06 22:32:24 +01:00
parent 87018d45e2
commit 4afe5aefd5

View File

@ -28,6 +28,7 @@ import shutil
import subprocess
import sys
import tempfile
import yaml
from urllib.parse import urlparse
from argparse import ArgumentParser
@ -264,6 +265,18 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base,
except subprocess.CalledProcessError:
pass
app_url = clone_url[:-len(NIGHTLY)]
template = dict()
template['AuthorName'] = clone_url.split('/')[4]
template['AuthorWebSite'] = '/'.join(clone_url.split('/')[:4])
template['Categories'] = ['nightly']
template['SourceCode'] = app_url
template['IssueTracker'] = app_url + '/issues'
template['Summary'] = 'Nightly build of ' + urlparse(app_url).path[1:]
template['Description'] = template['Summary']
with open('template.yml', 'w') as fp:
yaml.dump(template, fp)
subprocess.check_call(['fdroid', 'update', '--rename-apks', '--create-metadata', '--verbose'],
cwd=repo_basedir)
common.local_rsync(options, repo_basedir + '/metadata/', git_mirror_metadatadir + '/')