Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: replace dummy build target with bazel info #4577

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,6 @@ config_setting(
},
)

# This is a dummy target so Make can "blaze build --announce_rc <something>
# Where something truly does nothing that we may care about.

config_setting(
name = "dummy_setting",
define_values = {
"whatever": "whatever",
},
)

gazelle(
name = "gazelle",
build_tags = select({
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ lint-go-bazel:
$(info ==> $@)
@tools/quiet bazel test --config lint //...

GO_BUILD_TAGS_ARG=$(shell bazel build --ui_event_filters=-stdout,-stderr --announce_rc --noshow_progress :dummy_setting 2>&1 | grep "'build' options" | sed -n "s/^.*--define gotags=\(\S*\).*/--build-tags \1/p" )
GO_BUILD_TAGS_ARG=$(shell bazel info --ui_event_filters=-stdout,-stderr --announce_rc --noshow_progress 2>&1 | grep "'build' options" | sed -n "s/^.*--define gotags=\(\S*\).*/--build-tags \1/p" )

lint-go-golangci:
$(info ==> $@)
Expand Down
2 changes: 1 addition & 1 deletion tools/update_testdata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ folders=$(grep \
--exclude-dir=bazel-\* \
"xtest.UpdateGoldenFiles()" . | xargs dirname | sort | uniq )

GO_BUILD_TAGS_ARG=$(bazel build --ui_event_filters=-stdout,-stderr --announce_rc --noshow_progress :dummy_setting 2>&1 | grep "'build' options" | sed -n "s/^.*--define gotags=\(\S*\).*/-tags \1/p")
GO_BUILD_TAGS_ARG=$(bazel info --ui_event_filters=-stdout,-stderr --announce_rc --noshow_progress 2>&1 | grep "'build' options" | sed -n "s/^.*--define gotags=\(\S*\).*/-tags \1/p")

echo $folders -update | xargs go test ${GO_BUILD_TAGS_ARG}
echo $folders -count=1 | xargs go test ${GO_BUILD_TAGS_ARG}
Loading