Skip to content

Commit e337e83

Browse files
committed
Adding an artifacts make rule for release
1 parent d66b732 commit e337e83

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*.dylib
77
bin/*
88
Dockerfile.cross
9+
artifacts
910

1011
# Test binary, built with `go test -c`
1112
*.test

Diff for: Makefile

+7-8
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,13 @@ install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~
195195
uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
196196
$(KUSTOMIZE) build config/crd | $(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -f -
197197

198-
.PHONY: deploy
199-
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
200-
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
201-
$(KUSTOMIZE) build config/default | $(KUBECTL) apply -f -
202-
203-
.PHONY: undeploy
204-
undeploy: kustomize ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
205-
$(KUSTOMIZE) build config/default | $(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -f -
198+
##@ Release
199+
.PHONY: artifacts
200+
artifacts: kustomize
201+
if [ -d artifacts ]; then rm -rf artifacts; fi
202+
mkdir -p artifacts
203+
$(KUSTOMIZE) build config/crd -o artifacts/manifests.yaml
204+
@$(call clean-manifests)
206205

207206
##@ Dependencies
208207

0 commit comments

Comments
 (0)