comparison third_party/emsdk/scripts/get_release_info.py @ 179:8d17f6e6e290

[ThirdParty] Added emsdk bazel rules that can be supported by bazel 9.0.0
author MrJuneJune <me@mrjunejune.com>
date Thu, 22 Jan 2026 21:23:17 -0800
parents
children
comparison
equal deleted inserted replaced
178:94705b5986b3 179:8d17f6e6e290
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]))