-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
72 lines (68 loc) · 3.1 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
PROTOC=protoc
PROTOLOC=protocols/tmDataTransferProtocolv1
GO=go
GOBUILD=$(GO) build
BINDIR=build
BINCLI=TendermintConnector
INSTALLLOC=/usr/local/bin/$(BINCLI)
RELEASE=$(TENDERMINTCONNECTORBUILDVERSIONSTRING)
BUILDCOMMIT=$(shell git rev-parse HEAD)
BUILDLINE=$(shell git rev-parse --abbrev-ref HEAD)
CURRENTTIME=$(shell date -u '+%d-%m-%Y_%H-%M-%S')@UTC
# release-iris:
# $(PROTOC) --go_out=. $(PROTOLOC)/*.proto
# $(GOBUILD) -ldflags="\
# -X github.com/supragya/TendermintConnector/cmd.compilationChain=iris \
# -X github.com/supragya/TendermintConnector/version.applicationVersion=$(RELEASE) \
# -X github.com/supragya/TendermintConnector/version.buildCommit=$(BUILDLINE)@$(BUILDCOMMIT) \
# -X github.com/supragya/TendermintConnector/version.buildTime=$(CURRENTTIME) \
# -linkmode=external" \
# -o $(BINDIR)/iris_gateway
# release-cosmos:
# $(PROTOC) --go_out=. $(PROTOLOC)/*.proto
# $(GOBUILD) -ldflags="\
# -X github.com/supragya/TendermintConnector/cmd.compilationChain=cosmos \
# -X github.com/supragya/TendermintConnector/version.applicationVersion=$(RELEASE) \
# -X github.com/supragya/TendermintConnector/version.buildCommit=$(BUILDLINE)@$(BUILDCOMMIT) \
# -X github.com/supragya/TendermintConnector/version.buildTime=$(CURRENTTIME) \
# -linkmode=external" \
# -o $(BINDIR)/cosmos_gateway
proto-gen-tm34:
@docker pull -q tendermintdev/docker-build-proto
@echo "Generating Protobuf files"
@docker run -v $(shell pwd):/workspace --workdir /workspace tendermintdev/docker-build-proto sh ./chains/tm34/protocgen.sh
.PHONY: proto-gen
tm34:
# $(PROTOC) --go_out=. $(PROTOLOC)/*.proto
$(GOBUILD) -ldflags="\
-X github.com/supragya/TendermintConnector/cmd.compilationChain=tm34 \
-X github.com/supragya/TendermintConnector/version.applicationVersion=$(RELEASE) \
-X github.com/supragya/TendermintConnector/version.buildCommit=$(BUILDLINE)@$(BUILDCOMMIT) \
-X github.com/supragya/TendermintConnector/version.buildTime=$(CURRENTTIME) \
-linkmode=external" \
-o $(BINDIR)/tm34_gateway
iris:
# $(PROTOC) --go_out=. $(PROTOLOC)/*.proto
$(GOBUILD) -ldflags="\
-X github.com/supragya/TendermintConnector/cmd.compilationChain=iris \
-X github.com/supragya/TendermintConnector/version.applicationVersion=$(RELEASE) \
-X github.com/supragya/TendermintConnector/version.buildCommit=$(BUILDLINE)@$(BUILDCOMMIT) \
-X github.com/supragya/TendermintConnector/version.buildTime=$(CURRENTTIME) \
-linkmode=external" \
-o $(BINDIR)/iris_gateway
cosmos:
# $(PROTOC) --go_out=. $(PROTOLOC)/*.proto
$(GOBUILD) -ldflags="\
-X github.com/supragya/TendermintConnector/cmd.compilationChain=cosmos \
-X github.com/supragya/TendermintConnector/version.applicationVersion=$(RELEASE) \
-X github.com/supragya/TendermintConnector/version.buildCommit=$(BUILDLINE)@$(BUILDCOMMIT) \
-X github.com/supragya/TendermintConnector/version.buildTime=$(CURRENTTIME) \
-linkmode=external" \
-o $(BINDIR)/cosmos_gateway
clean:
rm $(PROTOLOC)/*.go
rm -rf $(BINDIR)/*
install:
cp $(BIN) $(INSTALLLOC)
uninstall:
rm $(INSTALLLOC)