File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
GO := 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)
3
4
SPECIFIC_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
+
4
10
5
11
.PHONY : all
6
12
all : clean test build
7
13
8
14
$(CMDS ) :
9
15
$(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 $@ )
10
19
11
20
.PHONY : build
12
- build : clean $(CMDS )
21
+ build : clean $(CMDS ) $( OPM )
13
22
14
23
.PHONY : static
15
24
static : 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