Skip to content

Commit c0af794

Browse files
h9jianggopherbot
authored andcommitted
internal/task: fix a bug to show diff against last stable version
Only the stable version (Y is even) have release candidate, when releasing a stable minor version (vX.EVEN.0), the release note should show the diff between current version (vX.EVEN.0) and the latest patch of the last stable version(vX.EVEN-2.LATEST). For golang/vscode-go#3500 Change-Id: Ia1ed84d2b2da0789a3e3410f96ad7b6db007174b Reviewed-on: https://go-review.googlesource.com/c/build/+/613598 Reviewed-by: Hyang-Ah Hana Kim <[email protected]> Auto-Submit: Hongxiang Jiang <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 31c4176 commit c0af794

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/task/releasevscodego.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,12 +420,12 @@ func (r *ReleaseVSCodeGoTasks) createGitHubReleaseAsDraft(ctx *wf.TaskContext, r
420420
// The release notes will display the differences between the current release
421421
// and the appropriate previous release.
422422
// - For minor versions (vX.Y.0), the diff is shown against the latest patch
423-
// of the previous minor version (vX.Y-1.Z).
423+
// of the previous stable minor version (vX.Y-2.Z).
424424
// - For patch versions (vX.Y.Z), the diff is shown against the previous
425425
// patch version (vX.Y.Z-1).
426426
var previous releaseVersion
427427
if release.Patch == 0 {
428-
previous, _ = latestVersion(tags, isSameMajorMinor(release.Major, release.Minor-1), isReleaseVersion)
428+
previous, _ = latestVersion(tags, isSameMajorMinor(release.Major, release.Minor-2), isReleaseVersion)
429429
} else {
430430
previous, _ = latestVersion(tags, isSameMajorMinor(release.Major, release.Minor), isReleaseVersion)
431431
}

0 commit comments

Comments
 (0)