Change default manifest target path

Now the target path for the default manifest is
  $HOME/.airship/default. This is reasonable default
  location.

  The target path is a mandatory field in the
  definition of a manifest. If a user wants
  to use her current working directory as a location
  the manifests, then it must be properly configured
  in the $HOME/.airship/config.

Relates-To: #416
Relates-To: #417
Change-Id: I96601803939df5c7369d1580842dfabeb19aa017
This commit is contained in:
Vladimir Kozhukalov
2020-12-17 18:33:34 +03:00
parent ab7bbfce89
commit 639e53f9a0
10 changed files with 77 additions and 12 deletions

View File

@@ -44,12 +44,12 @@ func cloneRepositories(cfg *config.Config, noCheckout bool) error {
if err != nil {
return err
}
repository, err := repo.NewRepository(currentManifest.TargetPath, extraRepoConfig)
repository, err := repo.NewRepository(currentManifest.GetTargetPath(), extraRepoConfig)
if err != nil {
return err
}
log.Printf("Downloading %s repository %s from %s into %s",
repoName, repository.Name, extraRepoConfig.URL(), currentManifest.TargetPath)
repoName, repository.Name, extraRepoConfig.URL(), currentManifest.GetTargetPath())
err = repository.Download(noCheckout)
if err != nil {
return err