Skip to content

Commit

Permalink
[TASK] Add 'Save-results-json'
Browse files Browse the repository at this point in the history
  • Loading branch information
marble committed Aug 30, 2017
1 parent 9182d06 commit c279024
Showing 1 changed file with 41 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ def lookup(D, *keys, **kwdargs):
if exitcode == CONTINUE:
TheProjectResultBuildinfoResultJsonfile = os.path.join(TheProjectResultBuildinfo, 'results.json')

mapping = {'checksum_new': 'checksum'}
mapping = {
'checksum_new': 'checksum',
'builddir': 'publish_dir',
}
keys = [
"checksum_new",
"checksum_old",
Expand All @@ -88,9 +91,45 @@ def lookup(D, *keys, **kwdargs):
R = {}
for k in keys:
v = milestones.get(k)
if v is not None:
if v:
k2 = mapping.get(k, k)
R[k2] = v

buildsettings = milestones.get('buildsettings', {})
for k in [
'builddir',
'gitbranch',
'gitdir',
'giturl',
'localization',
'ter_extension',
'ter_extkey',
'ter_extversion',
'ter_version',
]:
v = buildsettings.get(k)
if v:
k2 = mapping.get(k, k)
R[k2] = v

html_key_values = milestones.get('html_key_values', {})
for k in ['build_time']:
v = html_key_values.get(k)
if v:
R[k] = v

settings_cfg_general = milestones.get('settings_cfg', {}).get('general', {})
for k in [
'copyright',
'description',
'project',
'release',
't3author',
'version']:
v = settings_cfg_general.get(k)
if v:
R[k] = v

tct.writejson(R, TheProjectResultBuildinfoResultJsonfile)

# ==================================================
Expand Down

0 comments on commit c279024

Please sign in to comment.