File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -181,3 +181,21 @@ help-me:
181181 @ echo " https://github.com/hyperpolymath/panic-attacker/issues/new"
182182 @ echo " "
183183 @ echo " Include the output of 'just doctor' in your report."
184+
185+
186+ # Print the current CRG grade (reads from READINESS.md '**Current Grade:** X' line)
187+ crg-grade :
188+ @ grade=$$(grep -oP ' (?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2 >/ dev/ null | head -1); \
189+ [ -z " $$grade" ] && grade=" X" ; \
190+ echo " $$grade"
191+
192+ # Generate a shields.io badge markdown for the current CRG grade
193+ # Looks for '**Current Grade:** X' in READINESS.md; falls back to X
194+ crg-badge :
195+ @ grade=$$(grep -oP ' (?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2 >/ dev/ null | head -1); \
196+ [ -z " $$grade" ] && grade=" X" ; \
197+ case " $$grade" in \
198+ A) color=" brightgreen" ;; B) color=" green" ;; C) color=" yellow" ;; \
199+ D) color=" orange" ;; E) color=" red" ;; F) color=" critical" ;; \
200+ *) color=" lightgrey" ;; esac; \
201+ echo " [](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades)"
You can’t perform that action at this time.
0 commit comments