-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support white background in coverage reports (#109)
Signed-off-by: Tronje Krop <[email protected]>
- Loading branch information
Showing
6 changed files
with
16 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ export GOPATH ?= $(shell $(GO) env GOPATH) | |
export GOBIN ?= $(GOPATH)/bin | ||
|
||
# Setup go-make version to use desired build and config scripts. | ||
GOMAKE_DEP ?= github.com/tkrop/[email protected].105 | ||
GOMAKE_DEP ?= github.com/tkrop/[email protected].106 | ||
INSTALL_FLAGS ?= -mod=readonly -buildvcs=auto | ||
# Request targets from go-make targets target. | ||
TARGETS := $(shell command -v $(GOBIN)/go-make >/dev/null || \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.0.105 | ||
0.0.106 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ export GOPATH ?= $(shell $(GO) env GOPATH) | |
export GOBIN ?= $(GOPATH)/bin | ||
|
||
# Setup go-make version to use desired build and config scripts. | ||
GOMAKE_DEP ?= github.com/tkrop/[email protected].105 | ||
GOMAKE_DEP ?= github.com/tkrop/[email protected].106 | ||
INSTALL_FLAGS ?= -mod=readonly -buildvcs=auto | ||
# Request targets from go-make targets target. | ||
TARGETS := $(shell command -v $(GOBIN)/go-make >/dev/null || \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -237,7 +237,7 @@ go-pkg = $(shell awk -v mode="$(2)" -v filter="$(3)" \ | |
|
||
|
||
# Setup go-make to use desired build and config scripts. | ||
GOMAKE_DEP := github.com/tkrop/[email protected].105 | ||
GOMAKE_DEP := github.com/tkrop/[email protected].106 | ||
GOMAKE_MAKEFILE := $(realpath $(firstword $(MAKEFILE_LIST))) | ||
GOMAKE_MAKEFILES := $(GOMAKE_MAKEFILE) \ | ||
$(wildcard Makefile.vars) $(wildcard Makefile.ext) | ||
|
@@ -782,7 +782,7 @@ $(addprefix git-create-,$(COMMIT_CONVENTION)):: git-create-%: | |
if [ -z "$${BRANCH}" ]; then BRANCH="update-deps"; fi; \ | ||
$(call git-message,$*,1); \ | ||
$(GIT) checkout -B "$${BRANCH}" && \ | ||
ARGS="" $(GIT) commit --signoff --message "$${MESSAGE}" && \ | ||
ARGS="" $(GIT) commit --signoff --message="$${MESSAGE}" && \ | ||
$(GIT) push --set-upstream origin "$${BRANCH}" || \ | ||
$(GIT) checkout $${BRANCH}; exit 0; | ||
#@ <message> # commits the current change set using the given message with current issue. | ||
|
@@ -954,7 +954,13 @@ test-clean:: | |
test-cover:: | ||
@FILE=$$(ls -Art "$(TEST_ALL)" "$(TEST_UNIT)" \ | ||
"$(TEST_BENCH)" 2>/dev/null); \ | ||
$(GO) tool cover -html="$${FILE}"; \ | ||
$(GO) tool cover -o "$${FILE}.html" -html="$${FILE}"; \ | ||
if [ $(ARGS) == "white" ]; then \ | ||
sed -i 's/black/whitesmoke/g' "$${FILE}.html"; \ | ||
fi; \ | ||
sensible-browser "$${FILE}.html"; | ||
|
||
# $(GO) tool cover -html="$${FILE}"; \ | ||
|
||
#@ upload the test coverage report to codacy. | ||
test-upload:: | ||
|
@@ -1408,7 +1414,7 @@ BUILD_ARCH ?= $(shell $(GO) env GOARCH) | |
main-pkg = $(patsubst $(1)=%,%,$(firstword $(filter $(1)=%,$(COMMANDS_PKG)))) | ||
|
||
# Functions and variables to propagate versions to build commands. | ||
LD_CONFIG_PATHS ?= main $(shell $(GO) list ./... | grep "config$$") | ||
LD_CONFIG_PATHS ?= main # $(shell $(GO) list ./... | grep "config$$") | ||
ld-flag = $(addprefix -X ,$(addsuffix .$(1),$(LD_CONFIG_PATHS))) | ||
ld-flags = $(call ld-flag,Version=$(BUILD_VERSION)) \ | ||
$(call ld-flag,Revision=$(shell $(GIT) rev-parse HEAD)) \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters