Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make: fix gen issue with mockgen not found in PATH #10162

Merged
merged 2 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
GO ?= go # if using docker, should not need to be installed/linked
GOBIN = $(CURDIR)/build/bin
GOBINREL = build/bin
GOBIN = $(CURDIR)/$(GOBINREL)
UNAME = $(shell uname) # Supported: Darwin, Linux
DOCKER := $(shell command -v docker 2> /dev/null)

Expand Down Expand Up @@ -210,7 +211,7 @@ mocks: mocks-clean

## mocks-clean: cleans all generated test mocks
mocks-clean:
grep -r -l --exclude-dir=erigon-lib "^// Code generated by MockGen. DO NOT EDIT.$$" . | xargs rm -r
grep -r -l --exclude-dir="erigon-lib" --exclude-dir="*$(GOBINREL)*" "^// Code generated by MockGen. DO NOT EDIT.$$" . | xargs rm -r

## solc: generate all solidity contracts
solc:
Expand Down
6 changes: 3 additions & 3 deletions erigon-lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ grpc: protoc-all
txpool/txpool.proto txpool/mining.proto
rm -rf vendor

$(GOBINREL)/mockgen: | $(GOBINREL)
build-mockgen:
$(GOBUILD) -o "$(GOBIN)/mockgen" go.uber.org/mock/mockgen

mocks-clean:
grep -r -l "^// Code generated by MockGen. DO NOT EDIT.$$" . | xargs rm -r
grep -r -l --exclude-dir="*$(GOBINREL)*" "^// Code generated by MockGen. DO NOT EDIT.$$" . | xargs rm -r

mocks: $(GOBINREL)/mockgen mocks-clean
mocks: build-mockgen mocks-clean
PATH="$(GOBIN):$(PATH)" go generate -run "mockgen" ./...

lintci-deps:
Expand Down
130 changes: 65 additions & 65 deletions polygon/heimdall/store_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading