Skip to content

Commit

Permalink
bazel: refine dev generate bazel skip optimization
Browse files Browse the repository at this point in the history
Without this stuff, a `dev generate bazel` without
`COCKROACH_BAZEL_FORCE_GENERATE=1` resulted in skipping `genbzl`
incorrectly.

Closes cockroachdb#76905.

Release note: None
  • Loading branch information
rickystewart authored and RajivTS committed Mar 6, 2022
1 parent 2e9e2cb commit cf747cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/bazelutil/bazel-generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ fi

bazel run //:gazelle

if files_unchanged_from_upstream $(find ./pkg -name '*.proto'); then
echo "Skipping generation of protobuf dependencies."
if files_unchanged_from_upstream $(find ./pkg -name '*.proto') $(find ./pkg -name BUILD.bazel) $(find ./pkg -name '*.bzl') $(find ./docs -name 'BUILD.bazel') $(find ./docs -name '*.bzl'); then
echo "Skipping //pkg/gen/genbzl (relevant files are unchanged from upstream)."
else
bazel run pkg/gen/genbzl --run_under="cd $PWD && " -- --out-dir pkg/gen
fi
Expand Down

0 comments on commit cf747cf

Please sign in to comment.