Skip to content

Commit

Permalink
Remove grep dependency
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Iwai <[email protected]>
  • Loading branch information
tenzen-y committed Sep 10, 2024
1 parent caa8564 commit 22da8af
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,6 @@ else
GOBIN=$(shell go env GOBIN)
endif

# Setting GREP allows macos users to install GNU grep and use the latter
# instead of the default BSD grep.
ifeq ($(shell command -v ggrep 2>/dev/null),)
GREP ?= $(shell command -v grep)
else
GREP ?= $(shell command -v ggrep)
endif
ifeq ($(shell ${GREP} --version 2>&1 | grep -q GNU; echo $$?),1)
$(error !!! GNU grep is required. If on OS X, use 'brew install grep'.)
endif

# Setting SHELL to bash allows bash commands to be executed by recipes.
# This is a requirement for 'setup-envtest.sh' in the test target.
# Options are set to exit when a recipe line exits non-zero or a piped command fails.
Expand Down Expand Up @@ -93,7 +82,7 @@ test-integrationv2: envtest

.PHONY: testv2
testv2:
go test $(shell go list ./pkg/... | $(GREP) -E '.*\.v2') -coverprofile cover.out
go test ./pkg/controller.v2/... ./pkg/runtime.v2/... ./pkg/webhook.v2/... ./pkg/util.v2/... -coverprofile cover.out

envtest:
ifndef HAS_SETUP_ENVTEST
Expand Down

0 comments on commit 22da8af

Please sign in to comment.