Centralize Go validation and build environments

This commit is contained in:
2026-10-06 16:38:15 +00:00
parent 12e866a94a
commit 08093124af
15 changed files with 637 additions and 129 deletions

View File

@@ -54,10 +54,11 @@ type BuildResult struct {
}
// Build compiles the selected targets with Version injected through buildinfo.
// It uses the prepared local Go environment, regenerates selected output files while preserving unrelated files,
// and verifies the version command on the native host before succeeding. An
// empty target set records source identity without running the Go toolchain.
// Errors return partial build facts in the result.
// It uses the available compatible local Go toolchain, applies ReleaseKit's
// readonly offline build settings, preserves effective cache and tool settings,
// and verifies the version command on the Go host before succeeding. An empty
// target set records source identity without running the Go toolchain. Errors
// return partial build facts in the result.
func Build(ctx context.Context, request BuildRequest) (BuildResult, error) {
result, err := internalbuild.Build(ctx, internalbuild.Request{
RepositoryDir: request.RepositoryDir,