From fe7c9d9573df2f2d343ff8defaac4f2b16000581 Mon Sep 17 00:00:00 2001 From: Paul Jolly Date: Mon, 30 Dec 2024 13:25:22 +0000 Subject: [PATCH] internal/ci: fix glob of files to delete Currently we hardcode the use of the .yml file extension. Fix that by removing the hard coding, preferring the base workflowFileExtension which is used elsewhere. Signed-off-by: Paul Jolly Change-Id: I16751060361e48eb9ca5ff088da780339c9281a3 Dispatch-Trailer: {"type":"trybot","CL":1206456,"patchset":1,"ref":"refs/changes/56/1206456/1","targetBranch":"master"} --- internal/ci/ci_tool.cue | 3 ++- internal/ci/github/workflows.cue | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/ci/ci_tool.cue b/internal/ci/ci_tool.cue index 5f8c4b624..da45ba2ca 100644 --- a/internal/ci/ci_tool.cue +++ b/internal/ci/ci_tool.cue @@ -19,6 +19,7 @@ import ( "encoding/yaml" "tool/file" + "cuelang.org/go/internal/ci/base" "cuelang.org/go/internal/ci/repo" "cuelang.org/go/internal/ci/github" ) @@ -43,7 +44,7 @@ command: gen: { workflows: { remove: { glob: file.Glob & { - glob: path.Join([_dir, "*.yml"], _goos) + glob: path.Join([_dir, "*" + base.workflowFileExtension], _goos) files: [...string] } for _, _filename in glob.files { diff --git a/internal/ci/github/workflows.cue b/internal/ci/github/workflows.cue index 0b0c49feb..b9ddc1643 100644 --- a/internal/ci/github/workflows.cue +++ b/internal/ci/github/workflows.cue @@ -15,7 +15,7 @@ // package github declares the workflows for this project. package github -// Note: the name of the workflows (and hence the corresponding .yml filenames) +// Note: the name of the workflows (and hence the corresponding .yaml filenames) // correspond to the environment variable names for gerritstatusupdater. // Therefore, this filename must only be change in combination with also // updating the environment in which gerritstatusupdater is running for this