diff options
author | Eric Multanen <eric.w.multanen@intel.com> | 2020-09-10 13:12:14 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-09-10 13:12:14 +0000 |
commit | dae8d6f81bf346b3e63d939081b80c269e925e50 (patch) | |
tree | b7933ebb28042e3cd5e2f2f03aedaf0b2782bb75 /src/k8splugin/Makefile | |
parent | 8d39c8b61929538dccea00329529104cc5866183 (diff) | |
parent | cf79276e2b633211d9a0befcb0e978dea447a9cf (diff) |
Merge "Provide capability to specify release-name during instantiation"
Diffstat (limited to 'src/k8splugin/Makefile')
-rw-r--r-- | src/k8splugin/Makefile | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/k8splugin/Makefile b/src/k8splugin/Makefile index 77196afa..a1cda8dd 100644 --- a/src/k8splugin/Makefile +++ b/src/k8splugin/Makefile @@ -8,13 +8,14 @@ ############################################################################## export GO111MODULE=on +GO ?= go .PHONY: plugins all: clean plugins CGO_ENABLED=1 GOOS=linux GOARCH=amd64 - @go build -tags netgo -o ./k8plugin ./cmd/main.go + @$(GO) build -tags netgo -o ./k8plugin ./cmd/main.go # The following is done this way as each patch on CI runs build and each merge runs deploy. So for build we don't need to build binary and hence # no need to create a static binary with additional flags. However, for generating binary, additional build flags are necessary. This if used with @@ -25,14 +26,14 @@ deploy: build .PHONY: test test: clean - @go build -race -buildmode=plugin -o ./mock_files/mock_plugins/mockplugin.so ./mock_files/mock_plugins/mockplugin.go - @go test -race ./... + @$(GO) build -race -buildmode=plugin -o ./mock_files/mock_plugins/mockplugin.so ./mock_files/mock_plugins/mockplugin.go + @$(GO) test -race ./... format: - @go fmt ./... + @$(GO) fmt ./... plugins: - @find plugins -maxdepth 1 -type d -not -path plugins -exec sh -c "ls {}/plugin.go | xargs go build -buildmode=plugin -tags netgo -o $(basename {}).so" \; + @find plugins -maxdepth 1 -type d -not -path plugins -exec sh -c "ls {}/plugin.go | xargs $(GO) build -buildmode=plugin -tags netgo -o $(basename {}).so" \; clean: @find . -name "*so" -delete @@ -40,5 +41,5 @@ clean: .PHONY: cover cover: - @go test -race ./... -coverprofile=coverage.out - @go tool cover -html=coverage.out -o coverage.html + @$(GO) test -race ./... -coverprofile=coverage.out + @$(GO) tool cover -html=coverage.out -o coverage.html |