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 @@ -161,3 +161,21 @@ echo ""
161161echo "LEARN : "
162162echo " just tour Guided project tour"
163163echo " just default List all recipes"
164+
165+
166+ # Print the current CRG grade (reads from READINESS.md '**Current Grade:** X' line)
167+ crg-grade :
168+ @ grade=$$(grep -oP ' (?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2 >/ dev/ null | head -1); \
169+ [ -z " $$grade" ] && grade=" X" ; \
170+ echo " $$grade"
171+
172+ # Generate a shields.io badge markdown for the current CRG grade
173+ # Looks for '**Current Grade:** X' in READINESS.md; falls back to X
174+ crg-badge :
175+ @ grade=$$(grep -oP ' (?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2 >/ dev/ null | head -1); \
176+ [ -z " $$grade" ] && grade=" X" ; \
177+ case " $$grade" in \
178+ A) color=" brightgreen" ;; B) color=" green" ;; C) color=" yellow" ;; \
179+ D) color=" orange" ;; E) color=" red" ;; F) color=" critical" ;; \
180+ *) color=" lightgrey" ;; esac; \
181+ echo " [](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades)"
You can’t perform that action at this time.
0 commit comments