test for adding subversions to shields.io

This commit is contained in:
Mikayla Fischler
2023-04-12 17:04:28 -04:00
parent df0ee7c4f7
commit 5c333c2a07
10 changed files with 32 additions and 2 deletions

View File

@@ -100,7 +100,29 @@ f.close()
manifest_size = os.path.getsize("install_manifest.json")
final_manifest = make_manifest(manifest_size)
# calculate file size then regenerate with embedded size
f = open("install_manifest.json", "w")
json.dump(make_manifest(manifest_size), f)
json.dump(final_manifest, f)
f.close()
# write all the JSON files for shields.io
for key, version in final_manifest["versions"].items():
f = open(".github/shields.io/" + key + ".json", "w")
if version.find("alpha") >= 0:
color = "yellow"
elif version.find("beta") >= 0:
color = "orange"
else:
color = "blue"
json.dump({
"schemaVersion": 1,
"label": key,
"message": "" + version,
"color": color
}, f)
f.close()