-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (47 loc) · 2.01 KB
/
Makefile
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
52
53
54
55
56
57
58
59
60
61
62
63
64
############
# Building #
############
build-plugins: ## Builds all plugins for all defined platforms
goreleaser build -f .goreleaser.plugin.yaml --clean --snapshot
.PHONY: build-plugins
build-plugins-single: ## Builds specified plugins in binary format only for current GOOS and GOARCH.
go run github.com/kubeshop/botkube/hack/target/build-plugins -plugin-targets=$(PLUGIN_TARGETS) -output-mode=binary -single-platform
.PHONY: build-plugins-single
build-plugins-archives: ## Builds all plugins for all defined platforms in form of archives
goreleaser release -f .goreleaser.plugin.yaml --clean --snapshot
.PHONY: build-plugins-archives
publish-plugins: ## Builds all plugins for all defined platforms in form of archives
goreleaser release -f .goreleaser.plugin.yaml
.PHONY: publish-plugins
##############
# Generating #
##############
USE_ARCHIVE ?= true
gen-plugin-index: ## Generate plugins YAML index file.
go run github.com/kubeshop/botkube/hack -binaries-path "./dist" -plugin-name-filter 'exec|flux|helm|argocd|github-events|keptn|prometheus|ai|ai-brain' -use-archive=$(USE_ARCHIVE)
.PHONY: gen-plugin-index
gen-dev-plugin-index: ## Generate plugins YAML index file with all plugins.
go run github.com/kubeshop/botkube/hack -binaries-path "./dist" -use-archive=$(USE_ARCHIVE)
.PHONY: gen-dev-plugin-index
gen-plugins-goreleaser: # Generate Goreleaser config for plugins
go run github.com/kubeshop/botkube/hack/target/gen-goreleaser
###############
# Developing #
###############
test: ## Run tests
go test -v -race ./...
.PHONY: test
fix-lint-issues: ## Automatically fix lint issues
go mod tidy
go mod verify
golangci-lint run --fix "./..."
.PHONY: fix-lint-issues
serve-local-plugins: ## Serve local plugins
go run github.com/kubeshop/botkube/hack/target/serve-plugins -plugins-dir=dist
.PHONY: serve-local-plugins
#############
# Others #
#############
help: ## Show this help
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.PHONY: help