Skip to content

Commit b82547d

Browse files
committed
scripts: Ignore upstream commits touching the root go.[sum,mod] files
Update the scripts/verify_commits.sh bash script and also ignore the root go.sum and go.mod files when validating upstream commits only touch relevant code paths. Due to that path the repository is structured, where everything builds from the root vendor directory, bumping the staging dependencies will influence the root dependencies.
1 parent b5bc8b5 commit b82547d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

scripts/verify_commits.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function verify_staging_sync() {
1818
local staging_dir="staging/${remote}"
1919

2020
local outside_staging
21-
outside_staging="$(git show --name-only "${downstream_commit}" -- ":!${staging_dir}" ':!vendor' ':!manifests')"
21+
outside_staging="$(git show --name-only "${downstream_commit}" -- ":!${staging_dir}" ':!vendor' ':!manifests' ':!go.sum' ':!go.mod')"
2222
if [[ -n "${outside_staging}" ]]; then
2323
err "downstream staging commit ${downstream_commit} changes files outside of ${staging_dir}, vendor, and manifests directories"
2424
err "${outside_staging}"
@@ -36,7 +36,6 @@ function verify_downstream_only() {
3636
err "downstream non-staging commit ${downstream_commit} changes staging"
3737
err "${inside_staging}"
3838
err "only staging commits (i.e. from an upstream cherry-pick) may change staging"
39-
4039
return 1
4140
fi
4241
}
@@ -58,7 +57,7 @@ function upstream_ref() {
5857
return 0
5958
fi
6059

61-
60+
6261
local invalid
6362
invalid=false
6463
if (( ${#upstream_repos[@]} != 1 )); then

0 commit comments

Comments
 (0)