mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-29 17:41:13 +00:00
Add kustomize build {repoUrl}
This commit is contained in:
@@ -53,6 +53,9 @@ func (l *fileLoader) Root() string {
|
||||
// Example: "/home/seans/project" or "/home/seans/project/"
|
||||
// NOT "/home/seans/project/file.yaml".
|
||||
func (l *fileLoader) New(newRoot string) (Loader, error) {
|
||||
if isRepoUrl(newRoot) {
|
||||
return newGithubLoader(newRoot, l.fSys)
|
||||
}
|
||||
if !l.IsAbsPath(l.root, newRoot) {
|
||||
return nil, fmt.Errorf("Not abs path: l.root='%s', loc='%s'\n", l.root, newRoot)
|
||||
}
|
||||
@@ -109,3 +112,8 @@ func (l *fileLoader) Load(location string) ([]byte, error) {
|
||||
}
|
||||
return l.fSys.ReadFile(fullLocation)
|
||||
}
|
||||
|
||||
// Cleanup does nothing
|
||||
func (l *fileLoader) Cleanup() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user