File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -261,3 +261,21 @@ echo ""
261261echo "LEARN : "
262262echo " just tour Guided project tour"
263263echo " just default List all recipes"
264+
265+
266+ # Print the current CRG grade (reads from READINESS.md '**Current Grade:** X' line)
267+ crg-grade :
268+ @ grade=$$(grep -oP ' (?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2 >/ dev/ null | head -1); \
269+ [ -z " $$grade" ] && grade=" X" ; \
270+ echo " $$grade"
271+
272+ # Generate a shields.io badge markdown for the current CRG grade
273+ # Looks for '**Current Grade:** X' in READINESS.md; falls back to X
274+ crg-badge :
275+ @ grade=$$(grep -oP ' (?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2 >/ dev/ null | head -1); \
276+ [ -z " $$grade" ] && grade=" X" ; \
277+ case " $$grade" in \
278+ A) color=" brightgreen" ;; B) color=" green" ;; C) color=" yellow" ;; \
279+ D) color=" orange" ;; E) color=" red" ;; F) color=" critical" ;; \
280+ *) color=" lightgrey" ;; esac; \
281+ echo " [](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades)"
You can’t perform that action at this time.
0 commit comments