-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (37 loc) · 1.47 KB
/
Copy pathMakefile
File metadata and controls
51 lines (37 loc) · 1.47 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
OUT :=./build/bin/pending-props-tp
PKG := github.com/propsproject/props-transaction-processor/cmd
DOCKERFILE := ./build/package/Dockerfile
VERSION := $(shell git describe --tags --always --long --dirty)
PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/)
GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/)
all: run
build-deploy:
docker build -f ${DOCKERFILE} -t $(REPO):$(BUILD_NUMBER) .
docker-image:
ifeq (${TAG},)
@echo "Pass the tag name, e.g make TAG=latest docker-image"
else
docker build -f ${DOCKERFILE} -t propsprojectservices/props-transaction-processor:${TAG} .
endif
deps:
go get ${PKG}
build:
go build -i -v -o ${OUT} -ldflags="-X main.repoVersion=${VERSION}" ${PKG}
test:
go test ./...
vet:
go vet ${PKG_LIST}
lint:
@for file in ${GO_FILES} ; do \
golint $$file ; \
done
runtp:
./${OUT}-v${VERSION} --validator-endpoint $(validator)
out:
@echo ${OUT}-v${VERSION}
protos:
protoc -I ./protos ./protos/transaction.proto ./protos/events.proto ./protos/payload.proto ./protos/balance.proto ./protos/users.proto ./protos/activity.proto ./protos/reward_entities.proto --go_out=./core/proto/pending_props_pb
protoc -I ./protos ./protos/transaction.proto ./protos/events.proto ./protos/payload.proto ./protos/balance.proto ./protos/users.proto ./protos/activity.proto ./protos/reward_entities.proto --js_out=import_style=commonjs,binary:./dev-cli/proto
clean:
-@rm ${OUT} ${OUT}-v*
.PHONY: run protos runtp build docker-image vet lint out deps build-cgo