File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -81,3 +81,21 @@ help-me:
8181assail :
8282 panic-attack assail .
8383
84+
85+
86+ # Print the current CRG grade (reads from READINESS.md '**Current Grade:** X' line)
87+ crg-grade :
88+ @ grade=$$(grep -oP ' (?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2 >/ dev/ null | head -1); \
89+ [ -z " $$grade" ] && grade=" X" ; \
90+ echo " $$grade"
91+
92+ # Generate a shields.io badge markdown for the current CRG grade
93+ # Looks for '**Current Grade:** X' in READINESS.md; falls back to X
94+ crg-badge :
95+ @ grade=$$(grep -oP ' (?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2 >/ dev/ null | head -1); \
96+ [ -z " $$grade" ] && grade=" X" ; \
97+ case " $$grade" in \
98+ A) color=" brightgreen" ;; B) color=" green" ;; C) color=" yellow" ;; \
99+ D) color=" orange" ;; E) color=" red" ;; F) color=" critical" ;; \
100+ *) color=" lightgrey" ;; esac; \
101+ echo " [](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades)"
You can’t perform that action at this time.
0 commit comments