diff --git a/.github/shields.io/bootloader.json b/.github/shields.io/bootloader.json deleted file mode 100644 index d7303d3..0000000 --- a/.github/shields.io/bootloader.json +++ /dev/null @@ -1 +0,0 @@ -{"schemaVersion": 1, "label": "bootloader", "message": "0.2", "color": "blue"} \ No newline at end of file diff --git a/.github/shields.io/comms.json b/.github/shields.io/comms.json deleted file mode 100644 index bc8e4ac..0000000 --- a/.github/shields.io/comms.json +++ /dev/null @@ -1 +0,0 @@ -{"schemaVersion": 1, "label": "comms", "message": "1.4.0", "color": "blue"} \ No newline at end of file diff --git a/.github/shields.io/coordinator.json b/.github/shields.io/coordinator.json deleted file mode 100644 index 76d7be2..0000000 --- a/.github/shields.io/coordinator.json +++ /dev/null @@ -1 +0,0 @@ -{"schemaVersion": 1, "label": "coordinator", "message": "v0.12.6", "color": "blue"} \ No newline at end of file diff --git a/.github/shields.io/installer.json b/.github/shields.io/installer.json deleted file mode 100644 index 4bfe644..0000000 --- a/.github/shields.io/installer.json +++ /dev/null @@ -1 +0,0 @@ -{"schemaVersion": 1, "label": "installer", "message": "v1.0", "color": "blue"} \ No newline at end of file diff --git a/.github/shields.io/pocket.json b/.github/shields.io/pocket.json deleted file mode 100644 index a51febe..0000000 --- a/.github/shields.io/pocket.json +++ /dev/null @@ -1 +0,0 @@ -{"schemaVersion": 1, "label": "pocket", "message": "alpha-v0.0.0", "color": "yellow"} \ No newline at end of file diff --git a/.github/shields.io/reactor-plc.json b/.github/shields.io/reactor-plc.json deleted file mode 100644 index 975d087..0000000 --- a/.github/shields.io/reactor-plc.json +++ /dev/null @@ -1 +0,0 @@ -{"schemaVersion": 1, "label": "reactor-plc", "message": "v1.1.5", "color": "blue"} \ No newline at end of file diff --git a/.github/shields.io/rtu.json b/.github/shields.io/rtu.json deleted file mode 100644 index 1eed29f..0000000 --- a/.github/shields.io/rtu.json +++ /dev/null @@ -1 +0,0 @@ -{"schemaVersion": 1, "label": "rtu", "message": "v0.13.3", "color": "blue"} \ No newline at end of file diff --git a/.github/shields.io/supervisor.json b/.github/shields.io/supervisor.json deleted file mode 100644 index cfdd8f6..0000000 --- a/.github/shields.io/supervisor.json +++ /dev/null @@ -1 +0,0 @@ -{"schemaVersion": 1, "label": "supervisor", "message": "v0.14.4", "color": "blue"} \ No newline at end of file diff --git a/imgen.py b/imgen.py index 7197619..3da13d2 100644 --- a/imgen.py +++ b/imgen.py @@ -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()