Skip to content

Commit f47adb8

Browse files
dmitshurgopherbot
authored andcommitted
internal/relui: drop v6l suffix in release announcement images sooner
CL 584403 fixed the root problem affecting published download metadata, but out of abundance of caution chose not to apply it to the remaining Go 1.22/1.21 minor releases. It's definitely safe to do it in the image generation sooner, though, so do that especially since the random dice rolls were not kind in https://x.com/golang/status/1798068033287840156 and https://hachyderm.io/@golang/112559902031577502. Change-Id: If725a021bb09732d223b5f70fb5bc1b5dde07947 Reviewed-on: https://go-review.googlesource.com/c/build/+/590595 Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent ea3d5d8 commit f47adb8

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

internal/task/tweet.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,15 @@ func tweetImage(published Published, rnd *rand.Rand) (imagePNG []byte, imageText
351351
if err != nil {
352352
return nil, "", err
353353
}
354+
goarch := a.GOARCH()
355+
if CompareGoVersions(a.Version, "go1.23") == -1 && a.OS != "linux" { // TODO: Delete this after Go 1.24.0 is out and this becomes dead code.
356+
goarch = strings.TrimSuffix(goarch, "v6l")
357+
}
354358
var buf bytes.Buffer
355359
if err := goCmdTmpl.Execute(&buf, map[string]string{
356360
"GoVer": published.Version,
357361
"GOOS": a.OS,
358-
"GOARCH": a.GOARCH(),
362+
"GOARCH": goarch,
359363
"Filename": a.Filename,
360364
"ZeroSize": fmt.Sprintf("%*d", digits(a.Size), 0),
361365
"HalfSize": fmt.Sprintf("%*d", digits(a.Size), a.Size/2),

internal/task/tweet_test.go

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,37 @@ Success. You may now run 'go1.21.0'
188188
$ go1.21.0 version
189189
go version go1.21.0 freebsd/amd64` + "\n",
190190
},
191+
{
192+
name: "fixup-v6l-suffix",
193+
kind: KindMinor,
194+
published: []Published{
195+
{Version: "go1.22.4", Files: []WebsiteFile{{
196+
OS: "windows", Arch: "armv6l",
197+
Filename: "go1.22.4.windows-arm.zip", Size: 74142698, Kind: "archive"}},
198+
},
199+
{Version: "go1.21.11"},
200+
},
201+
announcement: "https://groups.google.com/g/golang-announce/c/XbxouI9gY7k",
202+
randomSeed: 123,
203+
wantLog: `tweet text:
204+
🥳 Go 1.22.4 and 1.21.11 are released!
205+
206+
📢 Announcement: https://groups.google.com/g/golang-announce/c/XbxouI9gY7k
207+
208+
⬇️ Download: https://go.dev/dl/#go1.22.4
209+
210+
#golang
211+
tweet image:
212+
$ go install golang.org/dl/go1.22.4@latest
213+
$ go1.22.4 download
214+
Downloaded 0.0% ( 0 / 74142698 bytes) ...
215+
Downloaded 50.0% (37071349 / 74142698 bytes) ...
216+
Downloaded 100.0% (74142698 / 74142698 bytes)
217+
Unpacking go1.22.4.windows-arm.zip ...
218+
Success. You may now run 'go1.22.4'
219+
$ go1.22.4 version
220+
go version go1.22.4 windows/arm` + "\n",
221+
},
191222
}
192223

193224
func TestTweetRelease(t *testing.T) {

0 commit comments

Comments
 (0)