Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit 61a6afd

Browse files
committed
🏃 Add release notes utility
Signed-off-by: Vince Prignano <[email protected]>
1 parent 7b907ab commit 61a6afd

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ CONTROLLER_GEN_BIN := bin/controller-gen
5151
CONTROLLER_GEN := $(TOOLS_DIR)/$(CONTROLLER_GEN_BIN)
5252
GOLANGCI_LINT_BIN := bin/golangci-lint
5353
GOLANGCI_LINT := $(TOOLS_DIR)/$(GOLANGCI_LINT_BIN)
54+
RELEASE_NOTES_BIN := bin/release-notes
55+
RELEASE_NOTES := $(TOOLS_DIR)/$(RELEASE_NOTES_BIN)
5456

5557
# Allow overriding manifest generation destination directory
5658
MANIFEST_ROOT ?= "config"
@@ -175,6 +177,9 @@ RELEASE_DIR := out
175177
$(RELEASE_DIR):
176178
mkdir -p $(RELEASE_DIR)/
177179

180+
$(RELEASE_NOTES) : $(TOOLS_DIR)/go.mod
181+
cd $(TOOLS_DIR) && go build -o $(RELEASE_NOTES_BIN) -tags tools sigs.k8s.io/cluster-api/hack/tools/release
182+
178183
.PHONY: release
179184
release: clean-release ## Builds and push container images using the latest git tag for the commit.
180185
@if [ -z "${RELEASE_TAG}" ]; then echo "RELEASE_TAG is not set"; exit 1; fi
@@ -194,6 +199,9 @@ release-manifests: $(RELEASE_DIR) ## Builds the manifests to publish with a rele
194199
release-staging: ## Builds and push container images to the staging bucket.
195200
REGISTRY=$(STAGING_REGISTRY) $(MAKE) docker-build-all docker-push-all release-tag-latest
196201

202+
.PHONY: release-notes
203+
release-notes: $(RELEASE_NOTES)
204+
$(RELEASE_NOTES)
197205

198206
.PHONY: release-tag-latest
199207
release-tag-latest: ## Adds the latest tag to the last build tag.

hack/tools/tools.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ package tools
2121

2222
import (
2323
_ "github.com/golangci/golangci-lint/cmd/golangci-lint" // nolint
24+
_ "sigs.k8s.io/cluster-api/hack/tools/release" //nolint
2425
_ "sigs.k8s.io/controller-tools/cmd/controller-gen" // nolint
2526
)

0 commit comments

Comments
 (0)