forked from hyperledger/firefly
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (35 loc) · 2.23 KB
/
Makefile
File metadata and controls
36 lines (35 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
VGO=go
BINARY_NAME=firefly
GOFILES := $(shell find cmd internal pkg -name '*.go' -print)
MOCKERY=mockery
.DELETE_ON_ERROR:
all: build test
test: deps lint
$(VGO) test ./internal/... ./pkg/... ./cmd/... -cover -coverprofile=coverage.txt -covermode=atomic
coverage.html:
$(VGO) tool cover -html=coverage.txt
coverage: test coverage.html
lint:
$(shell go list -f '{{.Target}}' github.com/golangci/golangci-lint/cmd/golangci-lint) run
mocks: ${GOFILES}
$(MOCKERY) --case underscore --dir internal/blockchain --name Plugin --output mocks/blockchainmocks --outpkg blockchainmocks
$(MOCKERY) --case underscore --dir internal/blockchain --name Events --output mocks/blockchainmocks --outpkg blockchainmocks
$(MOCKERY) --case underscore --dir internal/database --name Plugin --output mocks/databasemocks --outpkg databasemocks
$(MOCKERY) --case underscore --dir internal/database --name Events --output mocks/databasemocks --outpkg databasemocks
$(MOCKERY) --case underscore --dir internal/p2pfs --name Plugin --output mocks/p2pfsmocks --outpkg p2pfsmocks
$(MOCKERY) --case underscore --dir internal/p2pfs --name Events --output mocks/p2pfsmocks --outpkg p2pfsmocks
$(MOCKERY) --case underscore --dir internal/aggregator --name Aggregator --output mocks/aggregatormocks --outpkg aggregatormocks
$(MOCKERY) --case underscore --dir internal/batching --name BatchManager --output mocks/batchingmocks --outpkg batchingmocks
$(MOCKERY) --case underscore --dir internal/broadcast --name Broadcast --output mocks/broadcastmocks --outpkg broadcastmocks
$(MOCKERY) --case underscore --dir internal/engine --name Engine --output mocks/enginemocks --outpkg enginemocks
$(MOCKERY) --case underscore --dir internal/wsclient --name WSClient --output mocks/wsmocks --outpkg wsmocks
firefly: ${GOFILES}
$(VGO) build -o ${BINARY_NAME} -ldflags "-X main.buildDate=`date -u +\"%Y-%m-%dT%H:%M:%SZ\"` -X main.buildVersion=$(BUILD_VERSION)" -tags=prod -tags=prod -v
build: ${BINARY_NAME}
clean:
$(VGO) clean
rm -f *.so ${BINARY_NAME}
builddeps:
$(VGO) get github.com/golangci/golangci-lint/cmd/golangci-lint
deps: builddeps
$(VGO) get