summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/Makefile
diff options
context:
space:
mode:
authorKonrad Bańka <k.banka@samsung.com>2020-09-04 14:44:45 +0200
committerKonrad Banka <k.banka@samsung.com>2020-09-08 11:29:55 +0000
commitcf79276e2b633211d9a0befcb0e978dea447a9cf (patch)
treee7e9c22c6e1e13bb7a039aa3eff23eff246875a1 /src/k8splugin/Makefile
parentd14246bb9a2c8874f9925c45322d678a93584adb (diff)
Provide capability to specify release-name during instantiation
Allow release-name property to be provided during instantiation that, if provided, overrides release-name specified in profile. Additionally updated Makefile to allow easy compilation with different go version easily. Issue-ID: MULTICLOUD-1175 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: Id8db484369045cfb0bc99543a80317644fc838f9
Diffstat (limited to 'src/k8splugin/Makefile')
-rw-r--r--src/k8splugin/Makefile15
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