Skip to content

Commit

Permalink
Relax check for licenses when generating Kitfiles to catch e.g. licen…
Browse files Browse the repository at this point in the history
…se.txt

When deciding if a file is a license file, include all files with
`license` as the prefix, to ensure we catch e.g. LICENSE.txt.
  • Loading branch information
amisevsk committed Dec 17, 2024
1 parent 6eaf1f0 commit 51c8638
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/lib/kitfile/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func GenerateKitfile(baseDir string, packageOpt *artifact.Package) (*artifact.Ki
Description: "Readme file",
})
continue
} else if strings.ToLower(name) == "license" {
} else if strings.HasPrefix(strings.ToLower(name), "license") {
kitfile.Docs = append(kitfile.Docs, artifact.Docs{
Path: name,
Description: "License file",
Expand Down

0 comments on commit 51c8638

Please sign in to comment.