1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-27 01:48:17 +00:00

travis: update script

This commit is contained in:
Pavol Rusnak 2018-06-23 12:33:59 +02:00
parent a2250e16c9
commit a01314de1a
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 5 additions and 3 deletions

View File

@ -17,7 +17,7 @@ install:
script:
- jsonlint defs/*.json
- cd defs/coins/tools && python build_coins.py
- python tools/build_coins.py --defs
notifications:
webhooks:

View File

@ -173,6 +173,7 @@ def process_json(fn):
print('OK')
return j, None
def process(for_device=None):
scriptdir = os.path.dirname(os.path.realpath(__file__))
@ -189,19 +190,20 @@ def process(for_device=None):
n = c['coin_name']
c['support'] = {}
for s in support_json.keys():
c['support'][s] = support_json[s][n] if n in support_json[s] else None
c['support'][s] = support_json[s][n] if n in support_json[s] else None # noqa:E501
if support_list is None or n in support_list:
coins[n] = c
defs[n] = d
return (coins, defs)
if __name__ == '__main__':
if len(sys.argv) > 1 and not sys.argv[1].startswith('-'):
for_device = sys.argv[1]
else:
for_device = None
(coins, defs) = process(for_device)
json.dump(coins, open('coins.json', 'w'), indent=4, sort_keys=True)