comparison third_party/emsdk/scripts/get_release_info.py @ 186:8cf4ec5e2191 hg-web

Fixed merge conflict.
author MrJuneJune <me@mrjunejune.com>
date Fri, 23 Jan 2026 22:38:59 -0800
parents 8d17f6e6e290
children
comparison
equal deleted inserted replaced
176:fed99fc04e12 186:8cf4ec5e2191
1 #!/usr/bin/env python3
2
3 import json
4 import sys
5
6
7 def get_latest(tagfile):
8 with open(tagfile) as f:
9 versions = json.load(f)
10 print(versions['aliases']['latest'])
11 return 0
12
13
14 def get_hash(tagfile, version):
15 with open(tagfile) as f:
16 versions = json.load(f)
17 print(versions['releases'][version])
18 return 0
19
20
21 if __name__ == '__main__':
22 if sys.argv[2] == 'latest':
23 sys.exit(get_latest(sys.argv[1]))
24 if sys.argv[2] == 'hash':
25 sys.exit(get_hash(sys.argv[1], sys.argv[3]))