diff --git a/.gitignore b/.gitignore index 9aaac31e4..609bc04cd 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ local /gen /cmds/test/generics /gen +bin/ diff --git a/Makefile b/Makefile index cef9b4fbf..342aecd5b 100644 --- a/Makefile +++ b/Makefile @@ -15,12 +15,22 @@ SOURCES := $(shell go list -f '{{$$I:=.Dir}}{{range .GoFiles }}{{$$I}}/{{.}} {{e GOPATH := $(shell go env GOPATH) build: ${SOURCES} + mkdir -p bin go build -ldflags "-s -w \ -X github.com/open-component-model/ocm/pkg/version.gitVersion=$(EFFECTIVE_VERSION) \ -X github.com/open-component-model/ocm/pkg/version.gitTreeState=$(GIT_TREE_STATE) \ -X github.com/open-component-model/ocm/pkg/version.gitCommit=$(COMMIT) \ -X github.com/open-component-model/ocm/pkg/version.buildDate=$(shell date --rfc-3339=seconds | sed 's/ /T/')" \ - ./cmds/ocm ./cmds/helminstaller + -o bin/ocm \ + ./cmds/ocm + + go build -ldflags "-s -w \ + -X github.com/open-component-model/ocm/pkg/version.gitVersion=$(EFFECTIVE_VERSION) \ + -X github.com/open-component-model/ocm/pkg/version.gitTreeState=$(GIT_TREE_STATE) \ + -X github.com/open-component-model/ocm/pkg/version.gitCommit=$(COMMIT) \ + -X github.com/open-component-model/ocm/pkg/version.buildDate=$(shell date --rfc-3339=seconds | sed 's/ /T/')" \ + -o bin/helminstaller \ + ./cmds/helminstaller .PHONY: install-requirements install-requirements: @@ -41,10 +51,6 @@ check: force-test: @go test --count=1 $(REPO_ROOT)/cmds/ocm $(REPO_ROOT)/cmds/helminstaller $(REPO_ROOT)/cmds/ocm/... $(REPO_ROOT)/pkg/... -.PHONY: force-test -force-test: - @go test --count=1 $(REPO_ROOT)/cmds/ocm/... $(REPO_ROOT)/pkg/... - .PHONY: test test: @echo "> Test"