Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ issues:
- stylecheck
text: "ST1016: methods on the same type should have the same receiver name"
path: .*(api|types)\/.*\/conversion.*\.go$
- path: notes\.go
linters:
- forbidigo
text: use of `fmt.Printf` forbidden by pattern || use of `fmt.Println` forbidden by pattern
include:
- EXC0002 # include "missing comments" issues from golangci-lint
max-issues-per-linter: 0
Expand Down
24 changes: 12 additions & 12 deletions hack/tools/release/notes.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,43 +226,43 @@ func run() int {
merges[superseded] = append(merges[superseded], "- `<insert superseded bumps and reverts here>`")
}

log.Println("<!-- markdownlint-disable no-inline-html line-length -->")
fmt.Println("<!-- markdownlint-disable no-inline-html line-length -->")
// TODO Turn this into a link (requires knowing the project name + organization)
log.Printf("# Changes since %v\n\n", lastTag)
fmt.Printf("# Changes since %v\n\n", lastTag)

// print the changes by category
for _, key := range outputOrder {
mergeslice := merges[key]
if len(mergeslice) > 0 {
log.Printf("## %v\n\n", key)
fmt.Printf("## %v\n\n", key)
for _, merge := range mergeslice {
log.Println(merge)
fmt.Println(merge)
}
log.Println()
fmt.Println()
}

// if we're doing beta/rc, print breaking changes and hide the rest of the changes
if key == warning {
if isBeta(latestTag) {
log.Printf(warningTemplate, "BETA RELEASE")
fmt.Printf(warningTemplate, "BETA RELEASE")
}
if isRC(latestTag) {
log.Printf(warningTemplate, "RELEASE CANDIDATE")
fmt.Printf(warningTemplate, "RELEASE CANDIDATE")
}
if isBeta(latestTag) || isRC(latestTag) {
log.Printf("<details>\n")
log.Printf("<summary>More details about the release</summary>\n\n")
fmt.Printf("<details>\n")
fmt.Printf("<summary>More details about the release</summary>\n\n")
}
}
}

// then close the details if we had it open
if isBeta(latestTag) || isRC(latestTag) {
log.Printf("</details>\n\n")
fmt.Printf("</details>\n\n")
}

log.Printf("The container image for this release is: %v\n", latestTag)
log.Println("\n_Thanks to all our contributors!_ 😊")
fmt.Printf("The container image for this release is: %v\n", latestTag)
fmt.Println("\n_Thanks to all our contributors!_ 😊")

return 0
}
Expand Down