From 51a2db4314cad5c04ab31f9da5be108b138d7995 Mon Sep 17 00:00:00 2001 From: smorihira Date: Mon, 9 Sep 2024 13:38:26 +0900 Subject: [PATCH] fix: delete buildPlatforms func --- hack/actions/gen/main.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/hack/actions/gen/main.go b/hack/actions/gen/main.go index 1f51be97500..51d955aff35 100644 --- a/hack/actions/gen/main.go +++ b/hack/actions/gen/main.go @@ -441,18 +441,15 @@ func (data *Data) setPullRequestPaths() { } } -func (data *Data) setBuildPlatforms() { +func (data *Data) initData() { + data.setPullRequestPaths() + if data.AliasImage { data.BuildPlatforms = "linux/amd64,linux/arm64" } if data.ContainerType == CIContainer || data.Name == loadtest { data.BuildPlatforms = "linux/amd64" } -} - -func (data *Data) initializeData() { - data.setPullRequestPaths() - data.setBuildPlatforms() data.Year = time.Now().Year() if maintainer := os.Getenv(maintainerKey); maintainer != "" { @@ -698,7 +695,7 @@ func main() { eg.Go(safety.RecoverFunc(func() error { data.Name = strings.TrimPrefix(name, "vald-") - data.initializeData() + data.initData() log.Infof("Generating %s's workflow", data.Name) workflow, err := data.generateWorkflowStruct()