From 7e75b54e2786784930af793e4738338fcf2c7774 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 6 Sep 2017 17:56:45 +0000 Subject: [PATCH] Adding badge for app CI --- .gitignore | 3 ++- appci/analyze.py | 9 +++++++++ appci/badges/fetch.sh | 9 +++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 appci/badges/fetch.sh diff --git a/.gitignore b/.gitignore index 2e105a7..7b33dbf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ -data/*.json +*.json www token pullrequests/data/ roadmap/data/ appci/data/ +appci/badges/ diff --git a/appci/analyze.py b/appci/analyze.py index 31e01fe..83b491e 100755 --- a/appci/analyze.py +++ b/appci/analyze.py @@ -1,5 +1,6 @@ #!/usr/bin/python +import os import json import glob @@ -49,5 +50,13 @@ def main(): with open("apps.json", "w") as f: json.dump(apps, f) + + for link in glob.glob("../www/integration/*.svg"): + os.unlink(link); + + for app in apps: + os.symlink("%s/badges/level%s.svg" % (os.getcwd(), app["level"]), + "../www/integration/%s.svg" % app["name"]) + main() diff --git a/appci/badges/fetch.sh b/appci/badges/fetch.sh new file mode 100644 index 0000000..f41c826 --- /dev/null +++ b/appci/badges/fetch.sh @@ -0,0 +1,9 @@ +wget -O - https://img.shields.io/badge/Integration-Level_7-brightgreen.svg > level7.svg +wget -O - https://img.shields.io/badge/Integration-Level_6-green.svg > level6.svg +wget -O - https://img.shields.io/badge/Integration-Level_5-green.svg > level5.svg +wget -O - https://img.shields.io/badge/Integration-Level_4-yellowgreen.svg > level4.svg +wget -O - https://img.shields.io/badge/Integration-Level_3-yellow.svg > level3.svg +wget -O - https://img.shields.io/badge/Integration-Level_2-yellow.svg > level2.svg +wget -O - https://img.shields.io/badge/Integration-Level_1-orange.svg > level1.svg +wget -O - https://img.shields.io/badge/Integration-Level_0-red.svg > level0.svg +wget -O - https://img.shields.io/badge/Integration-Unknown-lightgrey.svg > unknown.svg