1
0
mirror of https://github.com/ko-build/ko.git synced 2025-01-05 14:50:50 +02:00

Fix the other publishers (#165)

This commit is contained in:
Matt Moore 2020-05-06 13:26:22 -07:00 committed by GitHub
parent ea2beac575
commit ab4ca8ec17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -22,6 +22,7 @@ import (
"github.com/google/go-containerregistry/pkg/name"
v1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/daemon"
"github.com/google/ko/pkg/build"
)
const (
@ -42,6 +43,7 @@ func NewDaemon(namer Namer, tags []string) Interface {
// Publish implements publish.Interface
func (d *demon) Publish(img v1.Image, s string) (name.Reference, error) {
s = strings.TrimPrefix(s, build.StrictScheme)
// https://github.com/google/go-containerregistry/issues/212
s = strings.ToLower(s)

View File

@ -22,6 +22,7 @@ import (
"github.com/google/go-containerregistry/pkg/name"
v1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/tarball"
"github.com/google/ko/pkg/build"
)
type TarballPublisher struct {
@ -45,6 +46,7 @@ func NewTarball(file, base string, namer Namer, tags []string) *TarballPublisher
// Publish implements publish.Interface.
func (t *TarballPublisher) Publish(img v1.Image, s string) (name.Reference, error) {
s = strings.TrimPrefix(s, build.StrictScheme)
// https://github.com/google/go-containerregistry/issues/212
s = strings.ToLower(s)