From 1e60c8f1bb01c8304a44948d890ade1e37fd2c6b Mon Sep 17 00:00:00 2001 From: Kiran Kamineni Date: Wed, 31 Oct 2018 14:58:09 -0700 Subject: 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 --- src/k8splugin/Makefile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/k8splugin/Makefile') 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 -- cgit 1.2.3-korg