🐛 fix: update badge script to use License badge as reference point
All checks were successful
CI/CD Pipeline / Build Docker Cache (push) Successful in 8s
CI/CD Pipeline / CI Pipeline (push) Successful in 4m25s

This commit is contained in:
2026-04-08 17:14:20 +02:00
parent 362eac05c1
commit 7b4e5197d8

View File

@@ -86,11 +86,11 @@ if [ "$BADGE_TYPE" = "bdd" ] || [ "$BADGE_TYPE" = "unit" ]; then
# Update existing badge with proper markdown format # Update existing badge with proper markdown format
$SED_CMD "s|^\[!\[${BADGE_TYPE} Coverage\].*|"${BADGE_MARKDOWN}"|" README.md $SED_CMD "s|^\[!\[${BADGE_TYPE} Coverage\].*|"${BADGE_MARKDOWN}"|" README.md
else else
# Add new badge line after the main coverage badge # Add new badge line after the License badge (more reliable reference)
# Use a more reliable approach with temporary file for cross-platform compatibility # Use a more reliable approach with temporary file for cross-platform compatibility
TEMP_FILE=$(mktemp) TEMP_FILE=$(mktemp)
awk -v new_badge="${BADGE_MARKDOWN}" '{ awk -v new_badge="${BADGE_MARKDOWN}" '{
if ($0 ~ /\[!\[Coverage\].*img.shields.io.*coverage/) { if ($0 ~ /\[!\[License\].*license-MIT-green/) {
print $0 print $0
print new_badge print new_badge
} else { } else {