Skip to content

Commit

Permalink
Use awk to get the package name
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Feb 4, 2024
1 parent 5de455a commit 2c9734a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/makefile/makefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@ endif
}

if isSAPCC {
allGoFilesExpr := `$(patsubst $(shell go list .)%,.%/*.go,$(shell go list ./...))`
// `go list .` does not work to get the package name because it requires a go file in the current directory
// but some packages like concourse-swift-resource or gatekeeper-addons only have subpackages
allGoFilesExpr := `$(patsubst $(shell awk '$$1 == "module" {print $$2}' go.mod)%,.%/*.go,$(shell go list ./...))`

ignoreOptions := make([]string, len(cfg.GitHubWorkflow.License.IgnorePatterns))
for idx, pattern := range cfg.GitHubWorkflow.License.IgnorePatterns {
Expand Down

0 comments on commit 2c9734a

Please sign in to comment.