File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -273,3 +273,21 @@ help-me:
273273 @ echo " https://github.com/hyperpolymath/lcb-website/issues/new"
274274 @ echo " "
275275 @ echo " Include the output of 'just doctor' in your report."
276+
277+
278+ # Print the current CRG grade (reads from READINESS.md '**Current Grade:** X' line)
279+ crg-grade :
280+ @ grade=$$(grep -oP ' (?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2 >/ dev/ null | head -1); \
281+ [ -z " $$grade" ] && grade=" X" ; \
282+ echo " $$grade"
283+
284+ # Generate a shields.io badge markdown for the current CRG grade
285+ # Looks for '**Current Grade:** X' in READINESS.md; falls back to X
286+ crg-badge :
287+ @ grade=$$(grep -oP ' (?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2 >/ dev/ null | head -1); \
288+ [ -z " $$grade" ] && grade=" X" ; \
289+ case " $$grade" in \
290+ A) color=" brightgreen" ;; B) color=" green" ;; C) color=" yellow" ;; \
291+ D) color=" orange" ;; E) color=" red" ;; F) color=" critical" ;; \
292+ *) color=" lightgrey" ;; esac; \
293+ echo " [](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades)"
You can’t perform that action at this time.
0 commit comments