feat: move distribution builds to platform Docker builder

This commit is contained in:
npc0-hue
2026-07-30 19:25:50 +08:00
parent 1e004dc9ec
commit e614a17fe3
45 changed files with 4492 additions and 294 deletions
+22 -1
View File
@@ -1407,7 +1407,28 @@ func TestCoreServicePropagatesDuplicateErrors(t *testing.T) {
}
func newTestCoreService() *CoreService {
return newCoreService(repo.NewMemoryStore(), func() time.Time { return fixedTime })
svc := newCoreService(repo.NewMemoryStore(), func() time.Time { return fixedTime })
svc.ConfigureDistributionBuilder(staticDistributionBuilder{payload: []byte("platform-built-distribution")})
return svc
}
type staticDistributionBuilder struct {
payload []byte
err error
}
func (builder staticDistributionBuilder) Readiness() (bool, string) {
if builder.err != nil {
return false, builder.err.Error()
}
return true, ""
}
func (builder staticDistributionBuilder) Build(domain.DistributionBuildInput) ([]byte, error) {
if builder.err != nil {
return nil, builder.err
}
return domain.CopyBytes(builder.payload), nil
}
func createPluginAndRunEndpoint(t *testing.T, svc *CoreService) (domain.GamePlugin, domain.RunEndpoint) {