From 690e4f053dd052cf78b596bc2299efbb0c644c06 Mon Sep 17 00:00:00 2001 From: Mandresy Randrianarinjaka Date: Thu, 6 Feb 2025 15:01:57 +0300 Subject: [PATCH] chore: Update changelog format --- .gitea/workflows/versioning.yml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/versioning.yml b/.gitea/workflows/versioning.yml index 9c22db1..176cc48 100644 --- a/.gitea/workflows/versioning.yml +++ b/.gitea/workflows/versioning.yml @@ -149,41 +149,43 @@ jobs: { echo "## $NEW_VERSION+$NEW_BUILD ($DATE)" 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"