Example #1
0
File: serve.go Project: slack/helm
func (s *serveCmd) run() error {
	repoPath, err := filepath.Abs(s.repoPath)
	if err != nil {
		return err
	}
	if _, err := os.Stat(repoPath); os.IsNotExist(err) {
		return err
	}

	fmt.Fprintf(s.out, "Now serving you on %s\n", s.address)
	return repo.StartLocalRepo(repoPath, s.address)
}
Example #2
0
File: serve.go Project: runseb/helm
func serve(cmd *cobra.Command, args []string) error {

	repoPath, err := filepath.Abs(repoPath)
	if err != nil {
		return err
	}
	if _, err := os.Stat(repoPath); os.IsNotExist(err) {
		return err
	}

	repo.StartLocalRepo(repoPath)
	return nil
}
Example #3
0
func (s *serveCmd) run() error {
	repoPath, err := filepath.Abs(s.repoPath)
	if err != nil {
		return err
	}
	if _, err := os.Stat(repoPath); os.IsNotExist(err) {
		return err
	}

	fmt.Fprintln(s.out, "Regenerating index. This may take a moment.")
	if err := index(repoPath, "http://"+s.address, ""); err != nil {
		return err
	}

	fmt.Fprintf(s.out, "Now serving you on %s\n", s.address)
	return repo.StartLocalRepo(repoPath, s.address)
}
Example #4
0
func serve(cmd *cobra.Command, args []string) {
	repo.StartLocalRepo(localRepoDirectory())
}