chore: Update changelog format

This commit is contained in:
Mandresy Randrianarinjaka 2025-02-06 15:01:57 +03:00
parent 5f665b9de8
commit 690e4f053d

View File

@ -151,39 +151,41 @@ jobs:
echo ""
echo "### Breaking Changes"
BREAKING=$(echo "$COMMITS" | grep -i "breaking:" || true | sed -E 's/([a-f0-9]+)[[:space:]]+breaking:[[:space:]]+/- (#\1) /g')
BREAKING=$(echo "$COMMITS" | grep -i "breaking:" || true | sed -E 's/^[[:space:]]*([a-f0-9]+)[[:space:]]+breaking:[[:space:]]+/- (#\1) /g')
echo "${BREAKING:-No breaking changes found.}"
echo ""
echo "### Features"
FEATURES=$(echo "$COMMITS" | grep -i "feat:" || true | sed -E 's/([a-f0-9]+)[[:space:]]+feat:[[:space:]]+/- (#\1) /g')
FEATURES=$(echo "$COMMITS" | grep -i "feat:" || true | sed -E 's/^[[:space:]]*([a-f0-9]+)[[:space:]]+feat:[[:space:]]+/- (#\1) /g')
echo "${FEATURES:-No features found.}"
echo ""
echo "### Bug Fixes"
BUG_FIXES=$(echo "$COMMITS" | grep -i "fix:" || true | sed -E 's/([a-f0-9]+)[[:space:]]+fix:[[:space:]]+/- (#\1) /g')
BUG_FIXES=$(echo "$COMMITS" | grep -i "fix:" || true | sed -E 's/^[[:space:]]*([a-f0-9]+)[[:space:]]+fix:[[:space:]]+/- (#\1) /g')
echo "${BUG_FIXES:-No bug fixes found.}"
echo ""
echo "### Refactors"
REFACTOR=$(echo "$COMMITS" | grep -i "refactor:" || true | sed -E 's/([a-f0-9]+)[[:space:]]+refactor:[[:space:]]+/- (#\1) /g')
REFACTOR=$(echo "$COMMITS" | grep -i "refactor:" || true | sed -E 's/^[[:space:]]*([a-f0-9]+)[[:space:]]+refactor:[[:space:]]+/- (#\1) /g')
echo "${REFACTOR:-No refactors found.}"
echo ""
echo "### Style Changes"
STYLE=$(echo "$COMMITS" | grep -i "style:" || true | sed -E 's/([a-f0-9]+)[[:space:]]+style:[[:space:]]+/- (#\1) /g')
STYLE=$(echo "$COMMITS" | grep -i "style:" || true | sed -E 's/^[[:space:]]*([a-f0-9]+)[[:space:]]+style:[[:space:]]+/- (#\1) /g')
echo "${STYLE:-No style changes found.}"
echo ""
echo "### Chores"
CHORES=$(echo "$COMMITS" | grep -i "chore:" || true | sed -E 's/([a-f0-9]+)[[:space:]]+chore:[[:space:]]+/- (#\1) /g')
CHORES=$(echo "$COMMITS" | grep -i "chore:" || true | sed -E 's/^[[:space:]]*([a-f0-9]+)[[:space:]]+chore:[[:space:]]+/- (#\1) /g')
echo "${CHORES:-No chores found.}"
echo ""
echo "### Miscellaneous"
MISC=$(echo "$COMMITS" | grep -ivE "breaking:|feat:|fix:|refactor:|style:|chore:" || true | sed -E 's/([a-f0-9]+)[[:space:]]+/- (#\1) /g')
MISC=$(echo "$COMMITS" | grep -ivE "breaking:|feat:|fix:|refactor:|style:|chore:" || true | sed -E 's/^[[:space:]]*([a-f0-9]+)[[:space:]]+/- (#\1) /g')
echo "${MISC:-No miscellaneous changes found.}"
echo ""
# On conserve l'ancien contenu du changelog en bas
cat "$CHANGELOG_FILE"
} > "$TEMP_CHANGELOG"