From f1cd549b55cc90d23c8ffb7322e408a04174f213 Mon Sep 17 00:00:00 2001 From: Tcharp38 Date: Tue, 23 Apr 2024 12:17:23 +0200 Subject: [PATCH] update_changelog II --- .tools/update_changelog.sh | 30 +++++++++++++++++------------- docs/fr_FR/Changelog.md | 1 - 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.tools/update_changelog.sh b/.tools/update_changelog.sh index 107f42b520..cb0ce2b429 100644 --- a/.tools/update_changelog.sh +++ b/.tools/update_changelog.sh @@ -37,24 +37,28 @@ do continue # Continue until version updated fi - # Anything but a version line - if [[ "${L}" != "## "* ]]; then - # Adding current version + # Version line + if [[ "${L}" == "## "* ]]; then + if [[ "${L}" == "## ${VERSION}"* ]]; then + echo "- Version is already correct in changelog. Doing nothing" + echo + rm ${TMP} + break + fi + echo "- Updating version to ${VERSION}" echo "## ${VERSION}" >> ${TMP} - # Adding current line - echo "" >> ${TMP} - echo "${L}" >> ${TMP} STEP=2 # Copy rest of the file continue fi - # Version line: - if [[ "${L}" == "## ${VERSION}"* ]]; then - echo "- There is already correct version in changelog. Doing nothing" - echo - rm ${TMP} - break - fi + # Anything but a version line + echo "- Adding version ${VERSION}" + # Adding current version + echo "## ${VERSION}" >> ${TMP} + # Adding current line + echo "" >> ${TMP} + echo "${L}" >> ${TMP} + STEP=2 # Copy rest of the file # if [[ "${L}" == "- "* ]] || [[ "${L}" == " "* ]]; then # # It's a list (starts with '- ') or something starting with space diff --git a/docs/fr_FR/Changelog.md b/docs/fr_FR/Changelog.md index af6ce01306..2d3bc82e1a 100644 --- a/docs/fr_FR/Changelog.md +++ b/docs/fr_FR/Changelog.md @@ -1,6 +1,5 @@ # Plugin 'Abeille': changeLog - ## 240423-BETA-3 **Mise-à-jour de modèles**