test for adding subversions to shields.io
This commit is contained in:
24
imgen.py
24
imgen.py
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user