-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
46 lines (35 loc) · 1.25 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
# Use a single bash shell for each job, and immediately exit on failure
SHELL := bash
.SHELLFLAGS = -ceu
.ONESHELL:
# This doesn't work on directories.
# See https://stackoverflow.com/questions/25752543/make-delete-on-error-for-directory-targets
.DELETE_ON_ERROR:
all: lint
.PHONY: all
lint: build lint/helm lint/rules readme
./scripts/check-unstaged.sh
.PHONY: lint
lint/helm: lint/helm/coder-observability
.PHONY: lint/helm
lint/helm/coder-observability:
helm lint --strict --set coder.image.tag=v$(shell ./scripts/version.sh) coder-observability/
.PHONY: lint/helm/coder-observability
build:
./scripts/compile.sh
.PHONY: build
lint/rules: lint/helm/prometheus-rules
.PHONY: lint/rules
lint/helm/prometheus-rules:
@./scripts/lint-rules.sh
.PHONY: lint/helm/prometheus-rules
# Usage: publish-patch, publish-minor, publish-major
# Publishing is handled by GitHub Actions, triggered by tag creation.
publish-%:
version=$(shell ./scripts/version.sh --bump $*) && \
git tag --sign "$$version" -m "Release: $$version" && \
git push origin tag "$$version"
readme:
go install github.com/norwoodj/helm-docs/cmd/helm-docs@latest
helm-docs --output-file ../README.md \
--values-file=values.yaml --chart-search-root=coder-observability --template-files=../README.gotmpl