build: correctly replace space with comma regardless GNU/BSD (#1272)

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
Takeshi Yoneda
2023-03-22 06:15:47 -07:00
committed by GitHub
parent cd05a22df2
commit 48f079ad83

View File

@@ -176,7 +176,7 @@ test:
.PHONY: coverage
# replace spaces with commas
coverpkg = $(main_packages: =,)
coverpkg = $(shell echo $(main_packages) | tr ' ' ',')
coverage: ## Generate test coverage
@go test -coverprofile=coverage.txt -covermode=atomic --coverpkg=$(coverpkg) $(main_packages)
@go tool cover -func coverage.txt