Skip to content

Commit dfc54fd

Browse files
authored
Fix mock generation in CI (#11)
1 parent f00ded0 commit dfc54fd

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ GOLANGCI_LINT:
4545

4646
########## BUILD ##########
4747
prereq::
48-
${GOCMD} install github.com/jstemmer/[email protected]
48+
$(GOCMD) install github.com/jstemmer/[email protected]
49+
GOBIN=${TOOLS_DIR} $(GOCMD) install go.uber.org/mock/[email protected]
4950

5051
build::
5152
go env GOOS GOARCH
@@ -67,7 +68,7 @@ clean-mock:
6768
.PHONY: generate-mock
6869
generate-mock: clean-mock
6970
@echo Generating test mocks
70-
go generate ./...
71+
TOOLS_DIR=$(TOOLS_DIR) go generate ./...
7172

7273
test-prereq: prereq generate-mock
7374
mkdir -p target/reports

commands/common/cmd_commons.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package common
22

3-
//go:generate mockgen -source=${GOFILE} -destination=mocks/${GOFILE}
3+
//go:generate ${TOOLS_DIR}/mockgen -source=${GOFILE} -destination=mocks/${GOFILE}
44

55
import (
66
"bytes"

commands/common/manifest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package common
22

3-
//go:generate mockgen -source=${GOFILE} -destination=mocks/${GOFILE}
3+
//go:generate ${TOOLS_DIR}/mockgen -source=${GOFILE} -destination=mocks/${GOFILE}
44

55
import (
66
"encoding/json"

0 commit comments

Comments
 (0)