Ignore mod_id.txt if the mod ID is set in meson_options.txt

Fixes forward-incompatible behaviour introduced by 0ff08c276f. The idea is to have mod owners migrate from using mod_id.txt to using meson_options.txt, but if prepare.py unconditionally prefers the former, nobody can use the latter.
This commit is contained in:
Tamás Bálint Misius 2022-12-19 19:57:49 +01:00
parent 0ff08c276f
commit 467049d4dd
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

2
.github/prepare.py vendored
View File

@ -46,7 +46,7 @@ with open('build-prepare/meson-info/intro-buildoptions.json') as f:
for option in json.loads(f.read()):
build_options[option['name']] = option['value']
if os.path.exists('.github/mod_id.txt'):
if int(build_options['mod_id']) == 0 and os.path.exists('.github/mod_id.txt'):
with open('.github/mod_id.txt') as f:
build_options['mod_id'] = f.read()