1
0
mirror of https://github.com/ko-build/ko.git synced 2025-07-15 23:54:17 +02:00

Extend ko.local and kind.local detection to include sub-repos (#796)

This commit is contained in:
Jason Hall
2022-08-22 19:51:02 -04:00
committed by GitHub
parent 2c58e4a136
commit 568da167be

View File

@ -168,7 +168,7 @@ func makePublisher(po *options.PublishOptions) (publish.Interface, error) {
innerPublisher, err := func() (publish.Interface, error) {
repoName := po.DockerRepo
namer := options.MakeNamer(po)
if repoName == publish.LocalDomain || po.Local {
if strings.HasPrefix(repoName, publish.LocalDomain) || po.Local {
// TODO(jonjohnsonjr): I'm assuming that nobody will
// use local with other publishers, but that might
// not be true.
@ -177,7 +177,7 @@ func makePublisher(po *options.PublishOptions) (publish.Interface, error) {
publish.WithLocalDomain(po.LocalDomain),
)
}
if repoName == publish.KindDomain {
if strings.HasPrefix(repoName, publish.KindDomain) {
return publish.NewKindPublisher(namer, po.Tags), nil
}