Skip to content

Commit

Permalink
internal/relui: update major release x/tools generate sequence
Browse files Browse the repository at this point in the history
CL 567837 extracted the stdlib manifest from x/tools/internal/imports
to x/tools/internal/stdlib. That is the new package that will need to
be regenerated every 6 months after each major Go release.

Update the relui task that automated that recurring work accordingly.

For golang/go#46136.
For golang/go#38706.

Change-Id: I9705ac881a18a5e7b03188228eadfaccf816aaca
Reviewed-on: https://go-review.googlesource.com/c/build/+/572777
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
  • Loading branch information
dmitshur authored and gopherbot committed Mar 19, 2024
1 parent 7c2d52f commit 8583c1a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions internal/relui/buildrelease_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ case "$1" in
echo "tidied!" >> go.mod
;;
"generate")
mkdir -p internal/imports
cd internal/imports && echo "package imports" >> zstdlib.go
mkdir -p internal/stdlib
cd internal/stdlib && echo "package stdlib" >> manifest.go
;;
*)
echo unexpected command $@
Expand Down
6 changes: 3 additions & 3 deletions internal/relui/workflows.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,9 @@ func addSingleReleaseWorkflow(
pushed := wf.Action3(wd, "Push issues", milestone.PushIssues, milestones, nextVersion, kindVal, wf.After(tagged))
published := wf.Task2(wd, "Publish to website", build.publishArtifacts, nextVersion, signedAndTestedArtifacts, wf.After(uploaded, availableOnProxy, pushed))
if kind == task.KindMajor {
goimportsCL := wf.Task2(wd, fmt.Sprintf("Mail goimports CL for 1.%d", major), version.CreateUpdateStdlibIndexCL, coordinators, nextVersion, wf.After(published))
goimportsCommit := wf.Task2(wd, "Wait for goimports CL submission", version.AwaitCL, goimportsCL, wf.Const(""))
wf.Output(wd, "goimports CL submitted", goimportsCommit)
xToolsStdlibCL := wf.Task2(wd, fmt.Sprintf("Mail x/tools stdlib CL for 1.%d", major), version.CreateUpdateStdlibIndexCL, coordinators, nextVersion, wf.After(published))
xToolsStdlibCommit := wf.Task2(wd, "Wait for x/tools stdlib CL submission", version.AwaitCL, xToolsStdlibCL, wf.Const(""))
wf.Output(wd, "x/tools stdlib CL submitted", xToolsStdlibCommit)
}

dockerBuild := wf.Task1(wd, "Start Google Docker build", build.runGoogleDockerBuild, nextVersion, wf.After(uploaded))
Expand Down
4 changes: 2 additions & 2 deletions internal/task/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func (t *VersionTasks) TagRelease(ctx *workflow.TaskContext, version, commit str
}

func (t *VersionTasks) CreateUpdateStdlibIndexCL(ctx *workflow.TaskContext, reviewers []string, version string) (string, error) {
build, err := t.CloudBuild.RunScript(ctx, "go generate ./internal/imports", "tools", []string{"internal/imports/zstdlib.go"})
build, err := t.CloudBuild.RunScript(ctx, "go generate ./internal/stdlib", "tools", []string{"internal/stdlib/manifest.go"})
if err != nil {
return "", err
}
Expand All @@ -228,7 +228,7 @@ func (t *VersionTasks) CreateUpdateStdlibIndexCL(ctx *workflow.TaskContext, revi

changeInput := gerrit.ChangeInput{
Project: "tools",
Subject: fmt.Sprintf("internal/imports: update stdlib index for %s\n\nFor golang/go#38706.", strings.Replace(version, "go", "Go ", 1)),
Subject: fmt.Sprintf("internal/stdlib: update stdlib index for %s\n\nFor golang/go#38706.", strings.Replace(version, "go", "Go ", 1)),
Branch: "master",
}
return t.Gerrit.CreateAutoSubmitChange(ctx, changeInput, reviewers, files)
Expand Down

0 comments on commit 8583c1a

Please sign in to comment.