aboutsummaryrefslogtreecommitdiffstats
path: root/src/k8splugin/Makefile
diff options
context:
space:
mode:
authorKiran Kamineni <kiran.k.kamineni@intel.com>2018-10-31 14:58:09 -0700
committerKiran Kamineni <kiran.k.kamineni@intel.com>2018-10-31 14:58:14 -0700
commit1e60c8f1bb01c8304a44948d890ade1e37fd2c6b (patch)
tree0d020225d3817ac705f8bd4b488b5f890a85ce51 /src/k8splugin/Makefile
parent3fec487b6db21303516380dbd7635978164bb8a7 (diff)
Migrate from dep to go mod
Migrate from dep to go mod which is native package management functionality in golang 1.11 Issue-ID: MULTICLOUD-392 Change-Id: I9a94cb38bd230738d7d0e586e6956b7a46472dd7 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
Diffstat (limited to 'src/k8splugin/Makefile')
-rw-r--r--src/k8splugin/Makefile10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/k8splugin/Makefile b/src/k8splugin/Makefile
index 0bc0cd55..2b9f0994 100644
--- a/src/k8splugin/Makefile
+++ b/src/k8splugin/Makefile
@@ -8,14 +8,14 @@
##############################################################################
GOPATH := $(shell realpath "$(PWD)/../../")
-DEPENDENCIES := github.com/golang/dep/cmd/dep
export GOPATH ...
+export GO111MODULE=on
.PHONY: plugins
-all: clean dep
+all: clean
CGO_ENABLED=1 GOOS=linux GOARCH=amd64
@find plugins -type d -not -path plugins -exec sh -c "ls {}/plugin.go | xargs go build -buildmode=plugin -a -tags netgo -o $(basename {}).so" \;
@go build -a -tags netgo -o ./k8plugin ./cmd/main.go
@@ -24,7 +24,7 @@ all: clean dep
# no need to create a static binary with additional flags. However, for generating binary, additional build flags are necessary. This if used with
# mock plugin errors out for unit tests. So the seperation avoids the error.
-build: clean dep plugins test cover
+build: clean plugins test cover
deploy: build
.PHONY: test
@@ -45,10 +45,6 @@ format:
plugins:
@find plugins -type d -not -path plugins -exec sh -c "ls {}/plugin.go | xargs go build -buildmode=plugin -o $(basename {}).so" \;
-dep:
- @go get -u $(DEPENDENCIES)
- $(GOPATH)/bin/dep ensure
-
clean:
find . -name "*so" -delete
@rm -f k8plugin