🐛 fix: update badge script to use License badge as reference point
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user