alternate plan for shields

This commit is contained in:
Mikayla Fischler 2023-04-12 17:21:39 -04:00
parent f48266e27c
commit f108db9cfc
9 changed files with 18 additions and 24 deletions

View File

@ -1 +0,0 @@
{"schemaVersion": 1, "label": "bootloader", "message": "0.2", "color": "blue"}

View File

@ -1 +0,0 @@
{"schemaVersion": 1, "label": "comms", "message": "1.4.0", "color": "blue"}

View File

@ -1 +0,0 @@
{"schemaVersion": 1, "label": "coordinator", "message": "v0.12.6", "color": "blue"}

View File

@ -1 +0,0 @@
{"schemaVersion": 1, "label": "installer", "message": "v1.0", "color": "blue"}

View File

@ -1 +0,0 @@
{"schemaVersion": 1, "label": "pocket", "message": "alpha-v0.0.0", "color": "yellow"}

View File

@ -1 +0,0 @@
{"schemaVersion": 1, "label": "reactor-plc", "message": "v1.1.5", "color": "blue"}

View File

@ -1 +0,0 @@
{"schemaVersion": 1, "label": "rtu", "message": "v0.13.3", "color": "blue"}

View File

@ -1 +0,0 @@
{"schemaVersion": 1, "label": "supervisor", "message": "v0.14.4", "color": "blue"}

View File

@ -1,5 +1,6 @@
import json
import os
import sys
# list files in a directory
def list_files(path):
@ -107,22 +108,23 @@ f = open("install_manifest.json", "w")
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 sys.argv[1] == "shields":
# write all the JSON files for shields.io
for key, version in final_manifest["versions"].items():
f = open("shields-" + key + ".json", "w")
if version.find("alpha") >= 0:
color = "yellow"
elif version.find("beta") >= 0:
color = "orange"
else:
color = "blue"
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)
json.dump({
"schemaVersion": 1,
"label": key,
"message": "" + version,
"color": color
}, f)
f.close()
f.close()