From 330b6b4eb8b4461b05940d12bac5d64b197b634b Mon Sep 17 00:00:00 2001 From: Ashley Dumaine Date: Fri, 23 Feb 2024 10:40:23 -0500 Subject: [PATCH] address review comments --- Makefile | 29 +++++++++++++++++++---------- docs/src/developers/development.md | 1 - 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 04ccdaa99..bf4756325 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ ARCH_SHORT := amd64 else ifeq ($(ARCH_SHORT),aarch64) ARCH_SHORT := arm64 endif -VERSION ?= $(shell git describe --always --dirty=-dev) +VERSION ?= $(shell git describe --always --tag --dirty=-dev) BUILD_ARGS := --build-arg VERSION=$(VERSION) # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) @@ -190,23 +190,32 @@ tilt-cluster: ctlptl tilt kind clusterctl RELEASE_DIR ?= release +.PHONY: release +release: $(KUSTOMIZE) clean-release set-manifest-image release-manifests generate-flavors release-templates release-metadata clean-release-git + +$(RELEASE_DIR): + mkdir -p $(RELEASE_DIR)/ + +.PHONY: release-metadata +release-metadata: $(RELEASE_DIR) + cp metadata.yaml $(RELEASE_DIR)/metadata.yaml + +.PHONY: release-templates +release-templates: $(RELEASE_DIR) + mv templates/cluster-template* $(RELEASE_DIR)/ + .PHONY: set-manifest-image set-manifest-image: ## Update kustomize image patch file for default resource. - sed -i'' -e 's@image: .*@image: '"${MANIFEST_IMG}:${MANIFEST_TAG}"'@' ./config/default/manager_image_patch.yaml + sed -i'' -e 's@image: .*@image: '"$(REGISTRY)/$(IMAGE_NAME):$(VERSION)"'@' ./config/default/manager_image_patch.yaml -.PHONY: release -release: $(KUSTOMIZE) clean-release - mkdir -p $(RELEASE_DIR)/ - $(MAKE) set-manifest-image MANIFEST_IMG=$(REGISTRY)/$(IMAGE_NAME) MANIFEST_TAG=$(VERSION) +.PHONY: release-manifests +release-manifests: $(KUSTOMIZE) $(RELEASE_DIR) $(KUSTOMIZE) build config/default > $(RELEASE_DIR)/infrastructure-components.yaml - $(MAKE) generate-flavors - mv templates/cluster-template* $(RELEASE_DIR)/ - cp metadata.yaml $(RELEASE_DIR)/metadata.yaml - $(MAKE) clean-release-git .PHONY: local-release local-release: RELEASE_DIR=infrastructure-linode/0.0.0 $(MAKE) release + $(MAKE) clean-release-git ## -------------------------------------- ## Cleanup diff --git a/docs/src/developers/development.md b/docs/src/developers/development.md index f5b9e6d08..f827777ac 100644 --- a/docs/src/developers/development.md +++ b/docs/src/developers/development.md @@ -205,7 +205,6 @@ clusterctl generate cluster $CLUSTER_NAME \ # Create the actual Cluster that uses the ClusterClass clusterctl generate cluster $CLUSTER_NAME \ --kubernetes-version v1.29.1 \ - --infrastructure linode:0.0.0 \ --from ./templates/flavors/clusterclass/cluster.yaml \ | kubectl apply -f - ```