From 3582cd3fb942aa2e0c21ed96787d0f930c681221 Mon Sep 17 00:00:00 2001 From: "Ing. Lukas Koszegy" Date: Wed, 31 Jan 2024 11:28:30 +0100 Subject: [PATCH] clean content of dist/install.yaml before update --- .../src/component-config-tutorial/testdata/project/Makefile | 3 ++- docs/book/src/cronjob-tutorial/testdata/project/Makefile | 3 ++- pkg/plugins/golang/v4/scaffolds/internal/templates/makefile.go | 3 ++- testdata/project-v4-multigroup-with-deploy-image/Makefile | 3 ++- testdata/project-v4-multigroup/Makefile | 3 ++- testdata/project-v4-with-deploy-image/Makefile | 3 ++- testdata/project-v4-with-grafana/Makefile | 3 ++- testdata/project-v4/Makefile | 3 ++- 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/docs/book/src/component-config-tutorial/testdata/project/Makefile b/docs/book/src/component-config-tutorial/testdata/project/Makefile index 39aea442b5..c38d029481 100644 --- a/docs/book/src/component-config-tutorial/testdata/project/Makefile +++ b/docs/book/src/component-config-tutorial/testdata/project/Makefile @@ -118,10 +118,11 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform .PHONY: build-installer build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment. mkdir -p dist + echo "---" > dist/install.yaml # Clean previous content @if [ -d "config/crd" ]; then \ $(KUSTOMIZE) build config/crd > dist/install.yaml; \ + echo "---" >> dist/install.yaml; \ fi - echo "---" >> dist/install.yaml # Add a document separator before appending cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} $(KUSTOMIZE) build config/default >> dist/install.yaml diff --git a/docs/book/src/cronjob-tutorial/testdata/project/Makefile b/docs/book/src/cronjob-tutorial/testdata/project/Makefile index 39aea442b5..c38d029481 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/Makefile +++ b/docs/book/src/cronjob-tutorial/testdata/project/Makefile @@ -118,10 +118,11 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform .PHONY: build-installer build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment. mkdir -p dist + echo "---" > dist/install.yaml # Clean previous content @if [ -d "config/crd" ]; then \ $(KUSTOMIZE) build config/crd > dist/install.yaml; \ + echo "---" >> dist/install.yaml; \ fi - echo "---" >> dist/install.yaml # Add a document separator before appending cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} $(KUSTOMIZE) build config/default >> dist/install.yaml diff --git a/pkg/plugins/golang/v4/scaffolds/internal/templates/makefile.go b/pkg/plugins/golang/v4/scaffolds/internal/templates/makefile.go index 667aef7335..870aae7f59 100644 --- a/pkg/plugins/golang/v4/scaffolds/internal/templates/makefile.go +++ b/pkg/plugins/golang/v4/scaffolds/internal/templates/makefile.go @@ -192,10 +192,11 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform .PHONY: build-installer build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment. mkdir -p dist + echo "---" > dist/install.yaml # Clean previous content @if [ -d "config/crd" ]; then \ $(KUSTOMIZE) build config/crd > dist/install.yaml; \ + echo "---" >> dist/install.yaml; \ fi - echo "---" >> dist/install.yaml # Add a document separator before appending cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} $(KUSTOMIZE) build config/default >> dist/install.yaml diff --git a/testdata/project-v4-multigroup-with-deploy-image/Makefile b/testdata/project-v4-multigroup-with-deploy-image/Makefile index 39aea442b5..c38d029481 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/Makefile +++ b/testdata/project-v4-multigroup-with-deploy-image/Makefile @@ -118,10 +118,11 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform .PHONY: build-installer build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment. mkdir -p dist + echo "---" > dist/install.yaml # Clean previous content @if [ -d "config/crd" ]; then \ $(KUSTOMIZE) build config/crd > dist/install.yaml; \ + echo "---" >> dist/install.yaml; \ fi - echo "---" >> dist/install.yaml # Add a document separator before appending cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} $(KUSTOMIZE) build config/default >> dist/install.yaml diff --git a/testdata/project-v4-multigroup/Makefile b/testdata/project-v4-multigroup/Makefile index 39aea442b5..c38d029481 100644 --- a/testdata/project-v4-multigroup/Makefile +++ b/testdata/project-v4-multigroup/Makefile @@ -118,10 +118,11 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform .PHONY: build-installer build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment. mkdir -p dist + echo "---" > dist/install.yaml # Clean previous content @if [ -d "config/crd" ]; then \ $(KUSTOMIZE) build config/crd > dist/install.yaml; \ + echo "---" >> dist/install.yaml; \ fi - echo "---" >> dist/install.yaml # Add a document separator before appending cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} $(KUSTOMIZE) build config/default >> dist/install.yaml diff --git a/testdata/project-v4-with-deploy-image/Makefile b/testdata/project-v4-with-deploy-image/Makefile index 39aea442b5..c38d029481 100644 --- a/testdata/project-v4-with-deploy-image/Makefile +++ b/testdata/project-v4-with-deploy-image/Makefile @@ -118,10 +118,11 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform .PHONY: build-installer build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment. mkdir -p dist + echo "---" > dist/install.yaml # Clean previous content @if [ -d "config/crd" ]; then \ $(KUSTOMIZE) build config/crd > dist/install.yaml; \ + echo "---" >> dist/install.yaml; \ fi - echo "---" >> dist/install.yaml # Add a document separator before appending cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} $(KUSTOMIZE) build config/default >> dist/install.yaml diff --git a/testdata/project-v4-with-grafana/Makefile b/testdata/project-v4-with-grafana/Makefile index 39aea442b5..c38d029481 100644 --- a/testdata/project-v4-with-grafana/Makefile +++ b/testdata/project-v4-with-grafana/Makefile @@ -118,10 +118,11 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform .PHONY: build-installer build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment. mkdir -p dist + echo "---" > dist/install.yaml # Clean previous content @if [ -d "config/crd" ]; then \ $(KUSTOMIZE) build config/crd > dist/install.yaml; \ + echo "---" >> dist/install.yaml; \ fi - echo "---" >> dist/install.yaml # Add a document separator before appending cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} $(KUSTOMIZE) build config/default >> dist/install.yaml diff --git a/testdata/project-v4/Makefile b/testdata/project-v4/Makefile index 39aea442b5..c38d029481 100644 --- a/testdata/project-v4/Makefile +++ b/testdata/project-v4/Makefile @@ -118,10 +118,11 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform .PHONY: build-installer build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment. mkdir -p dist + echo "---" > dist/install.yaml # Clean previous content @if [ -d "config/crd" ]; then \ $(KUSTOMIZE) build config/crd > dist/install.yaml; \ + echo "---" >> dist/install.yaml; \ fi - echo "---" >> dist/install.yaml # Add a document separator before appending cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} $(KUSTOMIZE) build config/default >> dist/install.yaml