From ef21453a614b3e8189b202d7a32b063093ba9ee6 Mon Sep 17 00:00:00 2001 From: Daniel Ziegenberg Date: Fri, 7 Feb 2025 18:02:08 +0100 Subject: [PATCH] Report list of modified upgrade.txt or UPGRADING.md files Signed-off-by: Daniel Ziegenberg --- remote_branch_checker/remote_branch_checker.sh | 6 ++++++ .../local_ci_fixture_upgrade_txt_for_405.regex | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/remote_branch_checker/remote_branch_checker.sh b/remote_branch_checker/remote_branch_checker.sh index 1c36898..ad8dc48 100755 --- a/remote_branch_checker/remote_branch_checker.sh +++ b/remote_branch_checker/remote_branch_checker.sh @@ -316,6 +316,12 @@ mv ${WORKSPACE}/work/patchset.files.tmp ${WORKSPACE}/work/patchset.files if [[ ${versionbranch} -ge 405 ]]; then if grep -q 'UPGRADING.md\|upgrade.txt' ${WORKSPACE}/work/patchset.files; then echo "Error: The patchset contains changes to upgrade.txt or UPGRADING.md files." | tee -a ${errorfile} + + dirtyupgrades="$( grep 'UPGRADING.md\|upgrade.txt' ${WORKSPACE}/work/patchset.files )" + if [[ -n "${dirtyupgrades}" ]]; then + echo "Error: File(s) affected:" | tee -a ${errorfile} + echo "${dirtyupgrades}" | sed 's/^/Error: /' | tee -a ${errorfile} + fi fi fi diff --git a/tests/fixtures/remote_branch_checker/local_ci_fixture_upgrade_txt_for_405.regex b/tests/fixtures/remote_branch_checker/local_ci_fixture_upgrade_txt_for_405.regex index 563714d..14ea503 100644 --- a/tests/fixtures/remote_branch_checker/local_ci_fixture_upgrade_txt_for_405.regex +++ b/tests/fixtures/remote_branch_checker/local_ci_fixture_upgrade_txt_for_405.regex @@ -5,3 +5,8 @@ condensedresult="smurf,error,1,0:overview,error,1,0 The patchset contains changes to upgrade.txt or UPGRADING.md files. +File(s) affected: +UPGRADING.md +lib/upgrade.txt +mod/assign/UPGRADING.md +mod/assign/upgrade.txt