Skip to content

Commit 9f8506c

Browse files
Merge pull request #921 from jpeeler/compile-bare-target
Add a target for compiling bare e2e
2 parents 1b20b3e + 769bf66 commit 9f8506c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
SHELL := /bin/bash
66
PKG := github.com/operator-framework/operator-lifecycle-manager
77
MOD_FLAGS := $(shell (go version | grep -q -E "1\.(11|12)") && echo -mod=vendor)
8-
CMDS := $(addprefix bin/, $(shell go list $(MOD_FLAGS) ./cmd/... | xargs -I{} basename {}))
8+
CMDS := $(shell go list $(MOD_FLAGS) ./cmd/...)
9+
TCMDS := $(shell go list $(MOD_FLAGS) ./test/e2e/...)
910
CODEGEN_INTERNAL := ./vendor/k8s.io/code-generator/generate_internal_groups.sh
1011
MOCKGEN := ./scripts/generate_mocks.sh
1112
# counterfeiter := $(GOBIN)/counterfeiter
@@ -42,6 +43,11 @@ coverage-html: cover.out
4243
build: build_cmd=build
4344
build: clean $(CMDS)
4445

46+
test-bare: BUILD_TAGS=-tags=bare
47+
test-bare: clean $(TCMDS)
48+
49+
test-bin: clean $(TCMDS)
50+
4551
# build versions of the binaries with coverage enabled
4652
build-coverage: build_cmd=test -c -covermode=count -coverpkg ./pkg/controller/...
4753
build-coverage: clean $(CMDS)
@@ -52,7 +58,10 @@ build-linux: clean $(CMDS)
5258

5359
$(CMDS): version_flags=-ldflags "-w -X $(PKG)/pkg/version.GitCommit=`git rev-parse --short HEAD` -X $(PKG)/pkg/version.OLMVersion=`cat OLM_VERSION`"
5460
$(CMDS):
55-
CGO_ENABLED=0 $(arch_flags) go $(build_cmd) $(MOD_FLAGS) $(version_flags) -o $@ $(PKG)/cmd/$(shell basename $@);
61+
CGO_ENABLED=0 $(arch_flags) go $(build_cmd) $(MOD_FLAGS) $(version_flags) -o bin/$(shell basename $@) $@
62+
63+
$(TCMDS):
64+
CGO_ENABLED=0 go test -c $(BUILD_TAGS) $(MOD_FLAGS) -o bin/$(shell basename $@) $@
5665

5766
run-local: build-linux
5867
rm -rf build

0 commit comments

Comments
 (0)