From: Kiran Date: Fri, 9 Feb 2018 18:01:22 +0000 (-0800) Subject: Adding Makefile for easier builds and ci X-Git-Tag: 2.0.0-ONAP~89 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=aaf%2Fsms.git;a=commitdiff_plain;h=662ef00510ee19f71c6aac7f0f09c6cbe6189c6e Adding Makefile for easier builds and ci Adding a Makefile to allow easier builds and for jenkins integration jenkins jjb will call make build, make deploy and so on Makefile resides along with the main application go file Issue-ID: AAF-117 Change-Id: Ibf4413a26d5572703bea122d3d0db83f4c35ae88 Signed-off-by: Kiran --- diff --git a/sms-service/src/sms/Makefile b/sms-service/src/sms/Makefile new file mode 100644 index 0000000..a206c55 --- /dev/null +++ b/sms-service/src/sms/Makefile @@ -0,0 +1,25 @@ +GOPATH := $(shell realpath "$(PWD)/../../") +BINARY := sms +DEPENDENCIES := github.com/golang/dep/cmd/dep + +export GOPATH ... + +all: build test +deploy: build test + +build: deps format + $(GOPATH)/bin/dep ensure + go build -o $(GOPATH)/target/$(BINARY) -v sms.go + +clean: + go clean + rm -f $(GOPATH)/target/$(BINARY) + +test: + go test -v ./... + +format: + go fmt ./... + +deps: + go get -u $(DEPENDENCIES) \ No newline at end of file