mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
support pretty output in JSON and for binary transparency logs
This makes make_index_v1() support `fdroid update --pretty`, then also uses pretty output for the binary transparency logs, so that the git history has nice, readable diffs between commits.
This commit is contained in:
parent
c591a4cd89
commit
6f71465ec1
2 changed files with 16 additions and 2 deletions
|
|
@ -220,7 +220,10 @@ def make_v1(apps, packages, repodir, repodict, requestsdict):
|
|||
json_name = 'index-v1.json'
|
||||
index_file = os.path.join(repodir, json_name)
|
||||
with open(index_file, 'w') as fp:
|
||||
json.dump(output, fp, default=_index_encoder_default)
|
||||
if common.options.pretty:
|
||||
json.dump(output, fp, default=_index_encoder_default, indent=2)
|
||||
else:
|
||||
json.dump(output, fp, default=_index_encoder_default)
|
||||
|
||||
if common.options.nosign:
|
||||
logging.debug('index-v1 must have a signature, use `fdroid signindex` to create it!')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue