Adding badge for app CI

This commit is contained in:
Alexandre Aubin 2017-09-06 17:56:45 +00:00
parent c5852ec617
commit 7e75b54e27
3 changed files with 20 additions and 1 deletions

3
.gitignore vendored
View file

@ -1,6 +1,7 @@
data/*.json *.json
www www
token token
pullrequests/data/ pullrequests/data/
roadmap/data/ roadmap/data/
appci/data/ appci/data/
appci/badges/

View file

@ -1,5 +1,6 @@
#!/usr/bin/python #!/usr/bin/python
import os
import json import json
import glob import glob
@ -49,5 +50,13 @@ def main():
with open("apps.json", "w") as f: with open("apps.json", "w") as f:
json.dump(apps, 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() main()

9
appci/badges/fetch.sh Normal file
View file

@ -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