Skip to content

Commit

Permalink
Merge pull request #1400 from imjasonh/skip-dots
Browse files Browse the repository at this point in the history
dag.NewPackages: skip yaml files starting with .
  • Loading branch information
imjasonh authored Jan 15, 2025
2 parents 4d082e8 + 26eee56 commit 94ca08e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ dag.svg
.idea
.packagerules
.melange.k8s.yaml

.DS_Store
7 changes: 2 additions & 5 deletions pkg/dag/packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,8 @@ func NewPackages(ctx context.Context, fsys fs.FS, dirPath, pipelineDir string) (
return fs.SkipDir
}

// Skip .yam.yaml and .melange.k8s.yaml
if d.Type().IsRegular() && path == ".yam.yaml" {
return nil
}
if d.Type().IsRegular() && path == ".melange.k8s.yaml" {
// .yam.yaml, .melange.k8s.yaml, .golangci.yaml, .pre-commit-config.yaml, etc.
if d.Type().IsRegular() && strings.HasPrefix(filepath.Base(path), ".") {
return nil
}

Expand Down

0 comments on commit 94ca08e

Please sign in to comment.