forked from scaling-lightning/scaling-lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (39 loc) · 2.06 KB
/
Makefile
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
LINT = go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest && ~/go/bin/golangci-lint run --timeout 5m
test: lint
go test -v `go list ./... | grep -v examples` | \
sed ''/PASS/s//$$(printf "\033[32mPASS\033[0m")/'' | sed ''/FAIL/s//$$(printf "\033[31mFAIL\033[0m")/''
lint:
$(LINT)
protoc-cln:
protoc --proto_path=clients/cln/grpc --go_out=. --go-grpc_out=. \
--go_opt=Mnode.proto=clients/cln/grpc \
--go_opt=Mprimitives.proto=clients/cln/grpc \
--go-grpc_opt=Mnode.proto=clients/cln/grpc \
--go-grpc_opt=Mprimitives.proto=clients/cln/grpc \
clients/cln/grpc/primitives.proto clients/cln/grpc/node.proto
protoc-std-lightning:
protoc --proto_path=pkg/standardclient/lightning/proto --go_out=. --go-grpc_out=. \
--go_opt=Mlightning_client.proto=pkg/standardclient/lightning \
--go-grpc_opt=Mlightning_client.proto=pkg/standardclient/lightning \
pkg/standardclient/lightning/proto/lightning_client.proto
protoc-std-bitcoin:
protoc --proto_path=pkg/standardclient/bitcoin/proto --go_out=. --go-grpc_out=. \
--go_opt=Mbitcoin_client.proto=pkg/standardclient/bitcoin \
--go-grpc_opt=Mbitcoin_client.proto=pkg/standardclient/bitcoin \
pkg/standardclient/bitcoin/proto/bitcoin_client.proto
protoc-std-common:
protoc --proto_path=pkg/standardclient/common/proto --go_out=. --go-grpc_out=. \
--go_opt=Mcommon_client.proto=pkg/standardclient/common \
--go-grpc_opt=Mcommon_client.proto=pkg/standardclient/common \
pkg/standardclient/common/proto/common_client.proto
protoc: protoc-cln protoc-std-lightning protoc-std-bitcoin protoc-std-common
build-cln-client:
docker build -t cln-client:latest -f clients/cln/Dockerfile .
build-lnd-client:
docker build -t lnd-client:latest -f clients/lnd/Dockerfile .
build-bitcoind-client:
docker build -t bitcoind-client:latest -f clients/bitcoind/Dockerfile .
generate-mocks:
go install github.com/vektra/mockery/[email protected]
mockery
.PHONY: lint test generate-mocks protoc protoc-std-common protoc-std-bitcoin protoc-std-lightning protoc-cln build-cln-client build-lnd-client build-bitcoind-client