summaryrefslogtreecommitdiffstats
path: root/src/dkv/Makefile
diff options
context:
space:
mode:
authorShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2018-02-09 14:16:04 -0800
committerShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2018-02-09 14:20:42 -0800
commiteebc178aa2c188ee25a4b2c6637b565279ae49f9 (patch)
treefcb2c9e0b8d87786e52b01a75d385e83c66a665c /src/dkv/Makefile
parentbe355e888af5b332797aee7507fdd6ed93261d6d (diff)
Add swagger.json API ref and refactor code base
This patch adds the API reference in the form of swagger.json and refactors codebase to help in building process using a Makefile. Change-Id: I1ce11de6daf8defb563d8b6f319f05711057413b Issue-ID: MUSIC-23 Signed-off-by: Shashank Kumar Shankar <shashank.kumar.shankar@intel.com>
Diffstat (limited to 'src/dkv/Makefile')
-rw-r--r--src/dkv/Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/dkv/Makefile b/src/dkv/Makefile
new file mode 100644
index 0000000..5b7d979
--- /dev/null
+++ b/src/dkv/Makefile
@@ -0,0 +1,26 @@
+GOPATH := $(shell realpath "$(PWD)/../../")
+BINARY=dkv
+DEPENDENCIES := github.com/golang/dep/cmd/dep
+
+export GOPATH ...
+
+all: build test
+deploy: build test
+
+build: deps format
+ echo $(GOPATH)
+ $(GOPATH)/bin/dep ensure
+ go build -o $(GOPATH)/target/$(BINARY) -v main.go
+
+clean:
+ go clean
+ rm -f $(GOPATH)/target/$(BINARY)
+
+test:
+ go test -v ./api/...
+
+format:
+ go fmt ./api/...
+
+deps:
+ go get -u $(DEPENDENCIES)