Skip to content

Commit fe049f2

Browse files
committed
🌱 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 <[email protected]>
1 parent c29c5f4 commit fe049f2

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

hack/tools/release/notes.go

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ var (
7373

7474
prefixAreaLabel = flag.Bool("prefix-area-label", true, "If enabled, will prefix the area label.")
7575

76+
preReleaseVersion = flag.Bool("pre-release-version", false, "If enabled, will add a pre-release warning header. (default false)")
77+
deprecation = flag.Bool("deprecation", true, "If enabled, will add a templated deprecation warning header.")
7678
addKubernetesVersionSupport = flag.Bool("add-kubernetes-version-support", true, "If enabled, will add the Kubernetes version support header.")
7779

7880
tagRegex = regexp.MustCompile(`^\[release-[\w-\.]*\]`)
@@ -307,15 +309,34 @@ func run() int {
307309
}
308310
}
309311

312+
if *preReleaseVersion {
313+
fmt.Printf("🚨 This is a RELEASE CANDIDATE. Use it only for testing purposes. If you find any bugs, file an [issue](https://github.com/%s/issues/new).\n", *repo)
314+
}
315+
310316
if *addKubernetesVersionSupport {
311-
// TODO Turn this into a link (requires knowing the project name + organization)
312317
fmt.Print(`## 👌 Kubernetes version support
313318
314319
- Management Cluster: v1.**X**.x -> v1.**X**.x
315320
- Workload Cluster: v1.**X**.x -> v1.**X**.x
316321
317322
[More information about version support can be found here](https://cluster-api.sigs.k8s.io/reference/versions.html)
318323
324+
`)
325+
}
326+
327+
fmt.Print(`## Highlights
328+
329+
* REPLACE ME
330+
331+
`)
332+
333+
if *deprecation {
334+
fmt.Print(`## Deprecation Warning
335+
336+
REPLACE ME: A couple sentences describing the deprecation, including links to docs.
337+
338+
* [GitHub issue #REPLACE ME](REPLACE ME)
339+
319340
`)
320341
}
321342

0 commit comments

Comments
 (0)