forked from multiversx/mx-chain-proxy-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (25 loc) · 706 Bytes
/
Makefile
File metadata and controls
34 lines (25 loc) · 706 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
SHELL := $(shell which bash)
.DEFAULT_GOAL := help
.PHONY: clean-test test build run
help:
@echo -e ""
@echo -e "Make commands:"
@grep -E '^[a-zA-Z_-]+:.*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":"}; {printf "\t\033[36m%-30s\033[0m\n", $$1}'
@echo -e ""
# #########################
# Base commands
# #########################
cmd_dir = cmd/proxy
binary = proxy
clean-test:
go clean -testcache
test: clean-test
go test ./...
build:
cd ${cmd_dir} && \
go build -v \
-o ${binary} \
-ldflags="-X main.appVersion=$(shell git describe --tags --long --dirty) -X main.commitID=$(shell git rev-parse HEAD)"
run: build
cd ${cmd_dir} && \
./${binary} --log-level="*:DEBUG" --start-swagger-ui