From c6cfbc09d91177bf4a93329e52c315647b41e4cb Mon Sep 17 00:00:00 2001 From: Dean Roehrich Date: Thu, 29 Aug 2024 13:29:11 -0500 Subject: [PATCH] Require that go.mod, go.sum, vendor/modules.txt be up to date (#194) Originally, this tool didn't fuss if these files were the only thing out of date. However, this has allowed some merge conflicts to appear. Signed-off-by: Dean Roehrich --- tools/release-all/release-all.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tools/release-all/release-all.sh b/tools/release-all/release-all.sh index 5cd3f861..1380b507 100755 --- a/tools/release-all/release-all.sh +++ b/tools/release-all/release-all.sh @@ -253,10 +253,7 @@ check_peer_modules() { go mod vendor || do_fail "${indent}Failure in go mod vendor" fi - # If the module update touched only go.mod, go.sum, or modules.txt then - # forget about it. - # Let the user deal with any changes bigger than that. - if [[ $(git status -s | grep -c -v -e go.mod -e go.sum -e vendor/modules.txt) -gt 0 ]]; then + if [[ $(git status -s | wc -l) -gt 0 ]]; then msg "${indent}Peer modules are behind." msg "${indent}Update the modules and create a PR. I used:" echo @@ -264,10 +261,6 @@ check_peer_modules() { echo exit 1 fi - - # It was only go.mod, go.sum, or modules.txt, so toss those. - git restore go.mod go.sum - [[ -f vendor/modules.txt ]] && git restore vendor/modules.txt fi }