Skip to content

Commit

Permalink
Accommodate for changes in vendored UPGRADING.md files
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Ziegenberg <[email protected]>
  • Loading branch information
ziegenberg committed Feb 7, 2025
1 parent ef21453 commit 443cf59
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions remote_branch_checker/remote_branch_checker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,12 @@ sed '/^$/d' ${WORKSPACE}/work/patchset.files > ${WORKSPACE}/work/patchset.files.
mv ${WORKSPACE}/work/patchset.files.tmp ${WORKSPACE}/work/patchset.files

# For 4.5 and up, verify that the we aren't modifying any upgrade.txt or UPGRADING.md files.
# lib/guzzlehttp/guzzle/UPGRADING.md is a false positive. It's a vendored file.
if [[ ${versionbranch} -ge 405 ]]; then
if grep -q 'UPGRADING.md\|upgrade.txt' ${WORKSPACE}/work/patchset.files; then
if sed '/lib\/guzzlehttp\/guzzle\/UPGRADING.md/d' ${WORKSPACE}/work/patchset.files | grep -q 'UPGRADING.md\|upgrade.txt'; 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 )"
dirtyupgrades="$( sed '/lib\/guzzlehttp\/guzzle\/UPGRADING.md/d' ${WORKSPACE}/work/patchset.files | grep 'UPGRADING.md\|upgrade.txt' )"
if [[ -n "${dirtyupgrades}" ]]; then
echo "Error: File(s) affected:" | tee -a ${errorfile}
echo "${dirtyupgrades}" | sed 's/^/Error: /' | tee -a ${errorfile}
Expand Down

0 comments on commit 443cf59

Please sign in to comment.