Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Generate mocks before building
Browse files Browse the repository at this point in the history
  • Loading branch information
der-eismann committed Apr 28, 2020
1 parent b425267 commit 9c73dd9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions golang.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ vendor: go.mod go.sum
format:
gofmt -s -w $(GOFILES)

vet: vendor
vet: go_generate vendor
go vet $(GOPKGS)

lint:
Expand All @@ -45,7 +45,7 @@ go_generate:
rm -rvf mocks
go generate ./...

test_packages: vendor
test_packages: go_generate vendor
go test $(GOPKGS)

test_format:
Expand All @@ -65,17 +65,17 @@ _build: vendor
$(TARGET);\
)

build: _build
build: go_generate _build
$(foreach TARGET,$(TARGETS),ln -sf $(OUTPUT_FILE) dist/$(OUTPUT_LINK);)

compress: _build
tar czf dist/$(OUTPUT_FILE).tar.gz dist/$(OUTPUT_FILE)

xc:
xc: go_generate
GOOS=linux GOARCH=amd64 make compress
GOOS=darwin GOARCH=amd64 make compress

install: vendor test
install: go_generate vendor test
$(foreach TARGET,$(TARGETS),go install \
$(BUILD_FLAGS);)

Expand Down

0 comments on commit 9c73dd9

Please sign in to comment.