summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKiran <kiran.k.kamineni@intel.com>2018-02-09 10:01:22 -0800
committerKiran <kiran.k.kamineni@intel.com>2018-02-09 12:56:26 -0800
commit662ef00510ee19f71c6aac7f0f09c6cbe6189c6e (patch)
treef8e988250e7de594afa6b6312f218efbfbfa219b
parent476aba57687abf592853c478775f34899aff21d9 (diff)
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 <kiran.k.kamineni@intel.com>
-rw-r--r--sms-service/src/sms/Makefile25
1 files changed, 25 insertions, 0 deletions
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