-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (43 loc) · 1.13 KB
/
Copy pathMakefile
File metadata and controls
51 lines (43 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
## Tools
TOOLS_DIR = $(shell pwd)/.tmp/bin
OPM=$(TOOLS_DIR)/opm
OPM_VERSION = v1.47.0
.PHONY: generate
generate: generate-catalog
.PHONY: generate-catalog
generate-catalog: $(OPM)
OPM=$(OPM) ./hack/generate-catalogs.sh
.PHONY: lint
lint: lint-pipelines
.PHONY: lint-pipelines
lint-pipelines: .tekton
@echo ">> running yamllint on all pipeline files"
ifeq (, $(shell command -v yamllint 2> /dev/null))
@echo "yamllint not installed so skipping" && exit 1
else
yamllint .tekton
endif
$(TOOLS_DIR):
@mkdir -p $(TOOLS_DIR)
.PHONY: opm
$(OPM) opm: $(TOOLS_DIR)
@{ \
[ -f $(OPM) ] && exit 0 ;\
set -ex ;\
OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/$(OPM_VERSION)/$${OS}-$${ARCH}-opm ;\
chmod +x $(OPM) ;\
}
# Install all required tools
.PHONY: tools
tools: $(OPM)
@{ \
set -ex ;\
tools_file=.github/tools ;\
echo '# DO NOT EDIT! Autogenerated by make tools' > $$tools_file ;\
echo '' >> $$tools_file ;\
echo $$(basename $(OPM)) $(OPM_VERSION) >> $$tools_file ;\
}
.PHONY: clean-tools
clean-tools:
rm -rf $(TOOLS_DIR)