mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-19 21:30:10 +01:00
nightly: create app metadata using template of parsed data
This commit is contained in:
parent
87018d45e2
commit
4afe5aefd5
@ -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 + '/')
|
||||
|
Loading…
Reference in New Issue
Block a user