Skip to content

Commit

Permalink
internal/ci: fix glob of files to delete
Browse files Browse the repository at this point in the history
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 <paul@myitcv.io>
Change-Id: I16751060361e48eb9ca5ff088da780339c9281a3
Dispatch-Trailer: {"type":"trybot","CL":1206456,"patchset":1,"ref":"refs/changes/56/1206456/1","targetBranch":"master"}
  • Loading branch information
myitcv authored and cueckoo committed Dec 30, 2024
1 parent 901604a commit fe7c9d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion internal/ci/ci_tool.cue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion internal/ci/github/workflows.cue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fe7c9d9

Please sign in to comment.