1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-06-25 09:22:33 +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: script:
- jsonlint defs/*.json - jsonlint defs/*.json
- cd defs/coins/tools && python build_coins.py - python tools/build_coins.py --defs
notifications: notifications:
webhooks: webhooks:

View File

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