get fetches the dependency
(dependency kptfile.Dependency)
| 155 | |
| 156 | // get fetches the dependency |
| 157 | func (c Command) get(dependency kptfile.Dependency) error { |
| 158 | path := filepath.Join(c.Dir, dependency.Name) |
| 159 | fmt.Fprintf(c.StdOut, "fetching %q from %q\n", dependency.Name, path) |
| 160 | if c.DryRun { |
| 161 | return nil |
| 162 | } |
| 163 | |
| 164 | return get.Command{ |
| 165 | Git: dependency.Git, |
| 166 | Destination: path, |
| 167 | Name: dependency.Name, |
| 168 | }.Run() |
| 169 | } |
| 170 | |
| 171 | // update updates the version of the fetched dependency to match |
| 172 | func (c Command) update(dependency kptfile.Dependency, k *kptfile.KptFile) error { |