File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 11GO := GOFLAGS="-mod=vendor" go
2- CMDS := $(addprefix bin/, $(shell ls ./cmd) )
2+ CMDS := $(addprefix bin/, $(shell ls ./cmd | grep -v opm) )
3+ OPM := $(addprefix bin/, opm)
34SPECIFIC_UNIT_TEST := $(if $(TEST ) ,-run $(TEST ) ,)
5+ PKG := github.com/operator-framework/operator-registry
6+ GIT_COMMIT := $(shell git rev-parse --short HEAD)
7+ OPM_VERSION := $(shell cat OPM_VERSION)
8+ BUILD_DATE := $(shell date -u +'% Y-% m-% dT% H:% M:% SZ')
9+
410
511.PHONY : all
612all : clean test build
713
814$(CMDS ) :
915 $(GO ) build $(extra_flags ) -o $@ ./cmd/$(notdir $@ )
16+ $(OPM ) : opm_version_flags=-ldflags "-X '$(PKG ) /cmd/opm/version.gitCommit=$(GIT_COMMIT ) ' -X '$(PKG ) /cmd/opm/version.opmVersion=$(OPM_VERSION ) ' -X '$(PKG ) /cmd/opm/version.buildDate=$(BUILD_DATE ) '"
17+ $(OPM ) :
18+ $(GO ) build $(opm_version_flags ) $(extra_flags ) -o $@ ./cmd/$(notdir $@ )
1019
1120.PHONY : build
12- build : clean $(CMDS )
21+ build : clean $(CMDS ) $( OPM )
1322
1423.PHONY : static
1524static : extra_flags=-ldflags '-w -extldflags "-static"'
Original file line number Diff line number Diff line change 1+ 1.12.3
You can’t perform that action at this time.
0 commit comments