File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -582,3 +582,21 @@ echo ""
582582echo "LEARN:"
583583echo " just tour Guided project tour"
584584echo " just default List all recipes"
585+
586+
587+ # Print the current CRG grade (reads from READINESS.md '**Current Grade:** X' line)
588+ crg-grade:
589+ @grade=$$ (grep -oP '(?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2>/dev/null | head -1); \
590+ [ -z "$$ grade" ] && grade="X"; \
591+ echo "$$ grade"
592+
593+ # Generate a shields.io badge markdown for the current CRG grade
594+ # Looks for '**Current Grade:** X' in READINESS.md; falls back to X
595+ crg-badge:
596+ @grade=$$ (grep -oP '(?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2>/dev/null | head -1); \
597+ [ -z "$$ grade" ] && grade="X"; \
598+ case "$$ grade" in \
599+ A) color="brightgreen" ;; B) color="green" ;; C) color="yellow" ;; \
600+ D) color="orange" ;; E) color="red" ;; F) color="critical" ;; \
601+ *) color="lightgrey" ;; esac; \
602+ echo "[](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades)"
You can’t perform that action at this time.
0 commit comments