mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
nightly: create app metadata using template of parsed data
This commit is contained in:
parent
87018d45e2
commit
4afe5aefd5
1 changed files with 13 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue