Skip to content

Commit

Permalink
cmd/api: use api/next directory for beta versions
Browse files Browse the repository at this point in the history
Even though we don't issue beta pre-releases of Go at this time,
it can still be useful to build them without publishing as part
of testing the release infrastructure.

For such versions, use the next directory content so that the
API check doesn't produce a false positive during the earlier
stages of the development cycle, before the next directory is
merged into a combined and eventually frozen api file.

For #29205.

Change-Id: Ib5e962670de1df22f7df64dd237b555953096808
Reviewed-on: https://go-review.googlesource.com/c/go/+/542000
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
  • Loading branch information
dmitshur authored and gopherbot committed Nov 14, 2023
1 parent dd88f23 commit 31f0af1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/api/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func Check(t *testing.T) {
}

var nextFiles []string
if strings.Contains(runtime.Version(), "devel") {
if v := runtime.Version(); strings.Contains(v, "devel") || strings.Contains(v, "beta") {
next, err := filepath.Glob(filepath.Join(testenv.GOROOT(t), "api/next/*.txt"))
if err != nil {
t.Fatal(err)
Expand Down

0 comments on commit 31f0af1

Please sign in to comment.