Centralize Go validation and build environments
This commit is contained in:
9
build.go
9
build.go
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user