From 662ef00510ee19f71c6aac7f0f09c6cbe6189c6e Mon Sep 17 00:00:00 2001 From: Kiran Date: Fri, 9 Feb 2018 10:01:22 -0800 Subject: [PATCH] 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 --- sms-service/src/sms/Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sms-service/src/sms/Makefile 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 -- 2.16.6