-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (25 loc) · 749 Bytes
/
Makefile
File metadata and controls
35 lines (25 loc) · 749 Bytes
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
ORG_NAME := AxLabs
REPO_NAME := go-jsonrpc-proxy
PKG_ROOT := github.com/${ORG_NAME}/$(REPO_NAME)
PKG_LIST := go list ${PKG_ROOT}/...
PKG_GO_JSONRPC_PROXY := ${PKG_ROOT}/cmd
CMD_DIR := ./cmd
.PHONY: all lint vet test go-jsonrpc-proxy
.EXPORT_ALL_VARIABLES:
GO111MODULE=on
all: lint vet test go-jsonrpc-proxy
vet:
@go vet $(shell $(PKG_LIST))
# Lint the files
lint:
@golint -set_exit_status $(shell $(PKG_LIST))
# Run unit tests
test:
@go test -v -short -count=1 $(shell $(PKG_LIST))
go-jsonrpc-proxy: $(CMD_DIR)/go-jsonrpc-proxy
$(CMD_DIR)/go-jsonrpc-proxy:
@echo "Building $@..."
@go build -i -o $(CMD_DIR)/go-jsonrpc-proxy -v $(PKG_GO_JSONRPC_PROXY)
@chmod u+x $(CMD_DIR)/go-jsonrpc-proxy
clean:
@rm -df $(CMD_DIR)/go-jsonrpc-proxy