1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +02:00
goreleaser/internal/client/release_notes.go

20 lines
452 B
Go
Raw Normal View History

package client
import "github.com/goreleaser/goreleaser/pkg/config"
func getReleaseNotes(existing, current string, mode config.ReleaseNotesMode) string {
switch mode {
case config.ReleaseNotesModeAppend:
return existing + "\n\n" + current
case config.ReleaseNotesModeReplace:
return current
case config.ReleaseNotesModePrepend:
return current + "\n\n" + existing
default:
if existing != "" {
return existing
}
return current
}
}