// GetBundleAtTag clones the repo if it doesn't exist, and then checks
// out the tag.
GetBundleAtTag clones the repo if it doesn't exist, and then checks
out the tag.
// GetBundleAtTag clones the repo if it doesn ' t exist and then checks // out the tag .
func GetBundleAtTag(conf *config.Config, url, tag string) error {
	if url == "" {
		url = conf.BundleDefsURL
	}
	if _, err := os.Stat(conf.Paths.BundleDefsRepo); err != nil {
		helpers.PrintBegin("cloning latest bundle definitions")
		err := helpers.CloneRepo(url, filepath.Dir(conf.Paths.BundleDefsRepo))
		if err != nil {
			return err
		}
		helpers.PrintComplete("bundle repo cloned to %s", conf.Paths.BundleDefsRepo)
		return nil
	}
	return helpers.CheckoutRepoTag(conf.Paths.BundleDefsRepo, tag)
}
func GetBundleAtTag ( conf * config . Config , url , tag string ) error { if url == " " { url = conf . BundleDefsURL } if _ , err := os . Stat ( conf . Paths . BundleDefsRepo ) ; err != nil { helpers . PrintBegin ( " " ) err := helpers . CloneRepo ( url , filepath . Dir ( conf . Paths . BundleDefsRepo ) ) if err != nil { return err } helpers . PrintComplete ( " " , conf . Paths . BundleDefsRepo ) return nil } return helpers . CheckoutRepoTag ( conf . Paths . BundleDefsRepo , tag ) }
GetBundleAtTag clones the repo if it doesn't exist, and then checks
out the tag.
GetBundleAtTag clones the repo if it doesn ' t exist and then checks out the tag .