🐛 fix: improve badge cleanup logic and remove duplicates
All checks were successful
CI/CD Pipeline / Build Docker Cache (push) Successful in 9s
CI/CD Pipeline / CI Pipeline (push) Successful in 4m31s

This commit is contained in:
2026-04-08 17:19:50 +02:00
parent 96929c842a
commit 564722e74f
2 changed files with 3 additions and 6 deletions

View File

@@ -4,10 +4,6 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/arcodange/dance-lessons-coach)](https://goreportcard.com/report/github.com/arcodange/dance-lessons-coach)
[![Version](https://img.shields.io/badge/version-1.4.0-blue.svg)](https://gitea.arcodange.fr/arcodange/dance-lessons-coach/releases)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![Unit Coverage](https://img.shields.io/badge/Unit_Coverage-8.4%-red?style=flat-square)](https://gitea.arcodange.lab/arcodange/dance-lessons-coach)
[![BDD Coverage](https://img.shields.io/badge/BDD_Coverage-55.9%-yellow?style=flat-square)](https://gitea.arcodange.lab/arcodange/dance-lessons-coach)
[![Unit Coverage](https://img.shields.io/badge/Unit_Coverage-8.4%-red?style=flat-square)](https://gitea.arcodange.lab/arcodange/dance-lessons-coach)
[![BDD Coverage](https://img.shields.io/badge/BDD_Coverage-55.9%-yellow?style=flat-square)](https://gitea.arcodange.lab/arcodange/dance-lessons-coach)
A Go project demonstrating idiomatic package structure, CLI implementation, and JSON API with Chi router.
=======

View File

@@ -55,9 +55,10 @@ fi
sed -i.bak '/^nhttps:\/\/.*img.shields.io.*Coverage/d' README.md 2>/dev/null || true
sed -i.bak '/^https:\/\/.*img.shields.io.*Coverage/d' README.md 2>/dev/null || true
# Remove old duplicate badges (with 0% coverage)
# Remove old duplicate badges for the specific type being updated
if [ "$BADGE_TYPE" = "bdd" ] || [ "$BADGE_TYPE" = "unit" ]; then
sed -i.bak "/${BADGE_TYPE}_Coverage-0%/d" README.md 2>/dev/null || true
# Remove all existing badges of this type before adding new one
sed -i.bak "/${BADGE_TYPE}_Coverage/d" README.md 2>/dev/null || true
fi
rm -f README.md.bak