Move to go mod from dep
[aaf/sms.git] / sms-service / src / sms / Makefile
1 GOPATH := $(shell realpath "$(CURDIR)/../../")
2 BINARY := sms
3 PLATFORM := linux
4
5 export GOPATH ...
6 export GO111MODULE=on
7
8 all: test build
9 deploy: test build
10
11 build: clean
12         CGO_ENABLED=0 GOOS=$(PLATFORM) go build -a \
13         -ldflags '-extldflags "-static"' \
14         -o $(GOPATH)/target/$(BINARY) -v sms.go
15
16 clean:
17         go clean
18         rm -f $(GOPATH)/target/$(BINARY)
19
20 test:
21         go test -cover ./...
22
23 format:
24         go fmt ./...
25
26 .PHONY: test