-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (24 loc) · 826 Bytes
/
Makefile
File metadata and controls
33 lines (24 loc) · 826 Bytes
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
.PHONY: build clean install package test test-integration uninstall
HOTPATCH_VERSION=$$(yq .version plugin.yaml)
HOTPATCH_PACKAGE=hotpatch-$(HOTPATCH_VERSION).tgz
HOTPATCH_BUILD_OUTPUT=hotpatch
build:
@go build -o $(HOTPATCH_BUILD_OUTPUT) ./cmd/hotpatch
clean:
@rm -rf $(HOTPATCH_BUILD_OUTPUT) ./package $(HOTPATCH_PACKAGE)
install: package
@helm plugin install $(HOTPATCH_PACKAGE)
package: build
@mkdir -p ./package
@cp ./hotpatch ./package/
@cp ./plugin.yaml ./package/
@helm plugin package ./package --sign=false
# TODO: Signing
# @helm plugin package ./package --sign --key "${HOTPATCH_SIGNING_KEY_EMAIL}"
test-flags=$(if $(TEST_FLAGS),$(TEST_FLAGS))
test:
@go test ./... $(test-flags)
test-integration:
@go test ./integration $(test-flags) -tags integration
uninstall:
@helm plugin uninstall hotpatch