From 29ccb618c213a7e529fa691dee12a85b19589039 Mon Sep 17 00:00:00 2001 From: Michael Shen Date: Sat, 19 Aug 2023 22:49:25 -0400 Subject: [PATCH] :seedling: Add additional blocks to release note generation * An optional header when generating a release candidate * A highlights header with filler to manually replace * An optional header about deprecation warnings Signed-off-by: Michael Shen --- hack/tools/release/notes.go | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/hack/tools/release/notes.go b/hack/tools/release/notes.go index 478571212365..0dd41ee219d2 100644 --- a/hack/tools/release/notes.go +++ b/hack/tools/release/notes.go @@ -73,6 +73,8 @@ var ( prefixAreaLabel = flag.Bool("prefix-area-label", true, "If enabled, will prefix the area label.") + releaseCandidate = flag.Bool("release-candidate", false, "If enabled, will add a release candidate warning header. (default false)") + deprecation = flag.Bool("deprecation", false, "If enabled, will add a templated deprecation warning header. (default false)") addKubernetesVersionSupport = flag.Bool("add-kubernetes-version-support", true, "If enabled, will add the Kubernetes version support header.") tagRegex = regexp.MustCompile(`^\[release-[\w-\.]*\]`) @@ -307,8 +309,11 @@ func run() int { } } + if *releaseCandidate { + fmt.Printf("🚨 This is a RELEASE CANDIDATE. Use it only for testing purposes. If you find any bugs, file an [issue](https://github.com/kubernetes-sigs/cluster-api/issues/new).\n") + } + if *addKubernetesVersionSupport { - // TODO Turn this into a link (requires knowing the project name + organization) fmt.Print(`## 👌 Kubernetes version support - Management Cluster: v1.**X**.x -> v1.**X**.x @@ -319,6 +324,23 @@ func run() int { `) } + fmt.Print(`## Highlights + +* REPLACE ME + +`) + + if *deprecation { + fmt.Print(`## Deprecation Warning + +REPLACE ME: A couple sentences describing the deprecation, including links to docs. + +* [GitHub issue #REPLACE ME](REPLACE ME) + +`) + } + + // TODO Turn this into a link (requires knowing the project name + organization) fmt.Printf("## Changes since %v\n---\n", commitRange) fmt.Printf("## :chart_with_upwards_trend: Overview\n")