diff options
Diffstat (limited to 'releaser')
-rw-r--r-- | releaser/releasenotes_writer.go | 4 | ||||
-rw-r--r-- | releaser/releaser.go | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/releaser/releasenotes_writer.go b/releaser/releasenotes_writer.go index 146cee198..82bcc629b 100644 --- a/releaser/releasenotes_writer.go +++ b/releaser/releasenotes_writer.go @@ -272,7 +272,7 @@ func (r *ReleaseHandler) writeReleaseNotesToTemp(version string, isPatch bool, i } -func (r *ReleaseHandler) writeReleaseNotesToDocs(title, sourceFilename string) (string, error) { +func (r *ReleaseHandler) writeReleaseNotesToDocs(title, description, sourceFilename string) (string, error) { targetFilename := "index.md" bundleDir := strings.TrimSuffix(filepath.Base(sourceFilename), "-ready.md") contentDir := hugoFilepath("docs/content/en/news/" + bundleDir) @@ -315,7 +315,7 @@ description: %q categories: ["Releases"]%s --- - `, time.Now().Format("2006-01-02"), title, title, fmTail)); err != nil { + `, time.Now().Format("2006-01-02"), title, description, fmTail)); err != nil { return "", err } diff --git a/releaser/releaser.go b/releaser/releaser.go index 178ad02a6..61b9d211f 100644 --- a/releaser/releaser.go +++ b/releaser/releaser.go @@ -95,6 +95,8 @@ func (r *ReleaseHandler) Run() error { version := newVersion.String() tag := "v" + version isPatch := newVersion.PatchLevel > 0 + mainVersion := newVersion + mainVersion.PatchLevel = 0 // Exit early if tag already exists exists, err := tagExists(tag) @@ -193,8 +195,14 @@ func (r *ReleaseHandler) Run() error { releaseNotesFile := getReleaseNotesDocsTempFilename(version, true) + title, description := version, version + if isPatch { + title = "Hugo " + version + ": A couple of Bug Fixes" + description = "This version fixes a couple of bugs introduced in " + mainVersion.String() + "." + } + // Write the release notes to the docs site as well. - docFile, err := r.writeReleaseNotesToDocs(version, releaseNotesFile) + docFile, err := r.writeReleaseNotesToDocs(title, description, releaseNotesFile) if err != nil { return err } |