Skip to content

Commit 40c9650

Browse files
committed
Reverts default channel
1 parent e1e6aa0 commit 40c9650

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ go 1.13
55
require (
66
github.com/blang/semver v3.5.0+incompatible
77
github.com/evanphx/json-patch v4.5.0+incompatible
8+
github.com/go-git/go-billy/v5 v5.0.0
89
github.com/go-git/go-git/v5 v5.1.0
910
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
1011
github.com/pkg/errors v0.8.1

go.sum

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,6 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
625625
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
626626
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
627627
gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
628-
gopkg.in/src-d/go-billy.v4 v4.3.2 h1:0SQA1pRztfTFx2miS8sA97XvooFeNOmvUenF4o0EcVg=
629628
gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98=
630629
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
631630
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=

pkg/patterns/addon/pkg/loaders/fs.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
addonsv1alpha1 "sigs.k8s.io/kubebuilder-declarative-pattern/pkg/patterns/addon/pkg/apis/v1alpha1"
2929
)
3030

31-
var FlagChannel = "https://github.com/SomtochiAma/channels.git"
31+
var FlagChannel = "./channels"
3232

3333
func init() {
3434
// TODO: Yuk - global flags are ugly
@@ -42,13 +42,13 @@ type ManifestLoader struct {
4242
// NewManifestLoader provides a Repository that resolves versions based on an Addon object
4343
// and loads manifests from the filesystem.
4444
func NewManifestLoader(channel string) (*ManifestLoader, error) {
45-
if strings.HasPrefix(channel, "git@") || strings.HasSuffix(channel, ".git") {
46-
repo := NewGitRepository(channel)
45+
if strings.HasPrefix(channel, "http://") || strings.HasPrefix(channel, "https://") {
46+
repo := NewHTTPRepository(channel)
4747
return &ManifestLoader{repo: repo}, nil
4848
}
4949

50-
if strings.HasPrefix(channel, "http://") || strings.HasPrefix(channel, "https://") {
51-
repo := NewHTTPRepository(channel)
50+
if strings.Contains(channel, ".git//") || strings.HasSuffix(channel, ".git") {
51+
repo := NewGitRepository(channel)
5252
return &ManifestLoader{repo: repo}, nil
5353
}
5454

0 commit comments

Comments
 (0)