@@ -28,7 +28,7 @@ import (
28
28
addonsv1alpha1 "sigs.k8s.io/kubebuilder-declarative-pattern/pkg/patterns/addon/pkg/apis/v1alpha1"
29
29
)
30
30
31
- var FlagChannel = "https://github.com/SomtochiAma/ channels.git "
31
+ var FlagChannel = "./ channels"
32
32
33
33
func init () {
34
34
// TODO: Yuk - global flags are ugly
@@ -42,13 +42,13 @@ type ManifestLoader struct {
42
42
// NewManifestLoader provides a Repository that resolves versions based on an Addon object
43
43
// and loads manifests from the filesystem.
44
44
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 )
47
47
return & ManifestLoader {repo : repo }, nil
48
48
}
49
49
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 )
52
52
return & ManifestLoader {repo : repo }, nil
53
53
}
54
54
0 commit comments