diff --git a/scripts/ci-update-coverage-badge.sh b/scripts/ci-update-coverage-badge.sh index f34281f..3e42c46 100755 --- a/scripts/ci-update-coverage-badge.sh +++ b/scripts/ci-update-coverage-badge.sh @@ -86,11 +86,11 @@ if [ "$BADGE_TYPE" = "bdd" ] || [ "$BADGE_TYPE" = "unit" ]; then # Update existing badge with proper markdown format $SED_CMD "s|^\[!\[${BADGE_TYPE} Coverage\].*|"${BADGE_MARKDOWN}"|" README.md 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 TEMP_FILE=$(mktemp) awk -v new_badge="${BADGE_MARKDOWN}" '{ - if ($0 ~ /\[!\[Coverage\].*img.shields.io.*coverage/) { + if ($0 ~ /\[!\[License\].*license-MIT-green/) { print $0 print new_badge } else {