From d5e7ecc3631abe55a8eeeb7c258285c784e6ab34 Mon Sep 17 00:00:00 2001 From: fcaffieri Date: Wed, 18 Mar 2026 16:41:54 -0300 Subject: [PATCH 1/4] Fix bumper script --- tools/repository_bumper.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tools/repository_bumper.sh b/tools/repository_bumper.sh index be7def50..ef064c4d 100644 --- a/tools/repository_bumper.sh +++ b/tools/repository_bumper.sh @@ -10,7 +10,7 @@ LOG_FILE="${DIR}/tools/repository_bumper_$(date +"%Y-%m-%d_%H-%M-%S-%3N").log" VERSION="" STAGE="" FILES_EDITED=() -FILES_EXCLUDED='--exclude="repository_bumper_*.log" --exclude="CHANGELOG.md" --exclude="repository_bumper.sh" --exclude="4_bumper_repository.yml"' +FILES_EXCLUDED='--exclude="repository_bumper_*.log" --exclude="CHANGELOG.md" --exclude="*repository_bumper.sh"' get_old_version_and_stage() { local VERSION_FILE="${DIR}/VERSION.json" @@ -125,11 +125,6 @@ main() { # Get old version and stage get_old_version_and_stage - if [[ "$OLD_VERSION" == "$VERSION" && "$OLD_STAGE" == "$STAGE" ]]; then - echo "Version and stage are already up to date." | tee -a "${LOG_FILE}" - echo "No changes needed." | tee -a "${LOG_FILE}" - exit 0 - fi if [[ "$OLD_VERSION" != "$VERSION" ]]; then echo "Updating version from $OLD_VERSION to $VERSION" | tee -a "${LOG_FILE}" update_version_in_files "$VERSION" From 9170b62916f1495017edee542cfc2ff9bc306e87 Mon Sep 17 00:00:00 2001 From: fcaffieri Date: Wed, 18 Mar 2026 17:31:33 -0300 Subject: [PATCH 2/4] Update CHANGELOG --- CHANGELOG.md | 2 +- test_bumper.sh | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 test_bumper.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 20be0027..22b1e219 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ All notable changes to this project will be documented in this file. ### Fixed -- None +- Fix bumper script early exit ([#1979](https://github.com/wazuh/wazuh-ansible/pull/1979)) ### Deleted diff --git a/test_bumper.sh b/test_bumper.sh new file mode 100644 index 00000000..9d50b642 --- /dev/null +++ b/test_bumper.sh @@ -0,0 +1,21 @@ +# 1. Ejecutar bump normal (distinto stage) +echo "$ sed -i 's/"stage": "alpha0"/"stage": "rc1"/' VERSION.json" +sed -i 's/"stage": "alpha0"/"stage": "rc1"/' VERSION.json + +echo "$ cat VERSION.json" +cat VERSION.json + +# 2. Ejecutar bumper con los mismos valores + --tag true +echo "$ bash tools/repository_bumper.sh --version 4.14.5 --stage rc1" +bash tools/repository_bumper.sh --version 4.14.5 --stage rc1 + +# 3. Evidencia +echo "$ cat tools/repository_bumper_*.log" +cat tools/repository_bumper_*.log + +echo "$ git status" +git status + +# 4. Cleanup +git checkout -- . +rm -f tools/repository_bumper_*.log From 511dffa10419a42d8308ebf1c3d588abc6207622 Mon Sep 17 00:00:00 2001 From: fcaffieri Date: Wed, 18 Mar 2026 17:33:24 -0300 Subject: [PATCH 3/4] Remove tests files --- test_bumper.sh | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 test_bumper.sh diff --git a/test_bumper.sh b/test_bumper.sh deleted file mode 100644 index 9d50b642..00000000 --- a/test_bumper.sh +++ /dev/null @@ -1,21 +0,0 @@ -# 1. Ejecutar bump normal (distinto stage) -echo "$ sed -i 's/"stage": "alpha0"/"stage": "rc1"/' VERSION.json" -sed -i 's/"stage": "alpha0"/"stage": "rc1"/' VERSION.json - -echo "$ cat VERSION.json" -cat VERSION.json - -# 2. Ejecutar bumper con los mismos valores + --tag true -echo "$ bash tools/repository_bumper.sh --version 4.14.5 --stage rc1" -bash tools/repository_bumper.sh --version 4.14.5 --stage rc1 - -# 3. Evidencia -echo "$ cat tools/repository_bumper_*.log" -cat tools/repository_bumper_*.log - -echo "$ git status" -git status - -# 4. Cleanup -git checkout -- . -rm -f tools/repository_bumper_*.log From f413f594b13e34ae08e97fec229d25a6a17c5477 Mon Sep 17 00:00:00 2001 From: fcaffieri Date: Thu, 19 Mar 2026 10:37:11 -0300 Subject: [PATCH 4/4] Revert bumper filter for exclusion files --- tools/repository_bumper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/repository_bumper.sh b/tools/repository_bumper.sh index ef064c4d..10856849 100644 --- a/tools/repository_bumper.sh +++ b/tools/repository_bumper.sh @@ -10,7 +10,7 @@ LOG_FILE="${DIR}/tools/repository_bumper_$(date +"%Y-%m-%d_%H-%M-%S-%3N").log" VERSION="" STAGE="" FILES_EDITED=() -FILES_EXCLUDED='--exclude="repository_bumper_*.log" --exclude="CHANGELOG.md" --exclude="*repository_bumper.sh"' +FILES_EXCLUDED='--exclude="repository_bumper_*.log" --exclude="CHANGELOG.md" --exclude="repository_bumper.sh" --exclude="4_bumper_repository.yml"' get_old_version_and_stage() { local VERSION_FILE="${DIR}/VERSION.json"