forked from ShyftNetwork/blockexplorer_api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (31 loc) · 904 Bytes
/
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
PKGS := $(shell go list ./... | grep -v /vendor)
.PHONY: test
test: lint
go test $(PKGS)
BIN_DIR := $(GOPATH)/bin
GOMETALINTER := $(BIN_DIR)/gometalinter
$(GOMETALINTER):
go get -u github.com/alecthomas/gometalinter
gometalinter --install &> /dev/null
.PHONY: lint
lint: $(GOMETALINTER)
gometalinter ./... exclude=gosec --vendor
run:
@echo " > \033[32mStarting server...\033[0m "
go run *.go
build:
@echo " > \033[32mBuilding binary...\033[0m "
go build -o blockx_api
start:
@echo " > \033[32mStarting server...\033[0m "
./blockx_api
install:
@echo " > \033[32mInstalling dependencies...\033[0m "
go mod vendor
docker:
@echo " > \033[32mStarting...\033[0m "
make build
@echo " > \033[32mBuilding docker image from Dockerfile...\033[0m "
docker build -t shyft_api .
@echo " > \033[32mRunning application through docker...\033[0m "
docker run -p 8080:8080 shyft_api