From 25865489e4ea236afc699f8b6c9c62fd92145af1 Mon Sep 17 00:00:00 2001 From: giri Date: Thu, 29 Mar 2018 04:58:14 +0000 Subject: [PATCH] Added Makefile for quorumclient Added Makefile for quorumclient Change-Id: Iee3912a8a675c7eab2514fc9257ae97dfc8b7157 Issue-ID: AAF-205 Signed-off-by: giri --- sms-quorum/bin/Dockerfile | 2 +- sms-quorum/src/smsquorum/Makefile | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 sms-quorum/src/smsquorum/Makefile diff --git a/sms-quorum/bin/Dockerfile b/sms-quorum/bin/Dockerfile index 1f3a2d5..2e1a191 100644 --- a/sms-quorum/bin/Dockerfile +++ b/sms-quorum/bin/Dockerfile @@ -6,4 +6,4 @@ LABEL maintainer="Girish Havaldar " ADD quorumclient /smsquorum/bin/quorumclient RUN chmod +x /smsquorum/bin/quorumclient -ENTRYPOINT ["/smsquorum/bin/quorumclient"] \ No newline at end of file +ENTRYPOINT ["/smsquorum/bin/quorumclient"] diff --git a/sms-quorum/src/smsquorum/Makefile b/sms-quorum/src/smsquorum/Makefile new file mode 100644 index 0000000..d264de9 --- /dev/null +++ b/sms-quorum/src/smsquorum/Makefile @@ -0,0 +1,25 @@ +GOPATH := $(shell realpath "$(PWD)/../../") +BINARY := quorumclient +PLATFORM := linux + +export GOPATH ... + +all: test build +deploy: test build + +build: format + CGO_ENABLED=0 GOOS=$(PLATFORM) go build -a \ + -ldflags '-extldflags "-static"' \ + -o $(GOPATH)/target/$(BINARY) -v quorumclient.go + +clean: + go clean + rm -f $(GOPATH)/target/$(BINARY) + +test: + @echo "Yet to Implement" + +format: + go fmt ./... + +.PHONY: test -- 2.16.6