|
|
|
@ -82,7 +82,6 @@ func newTemplateCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
|
|
|
|
|
var manifests bytes.Buffer
|
|
|
|
|
fmt.Fprintln(&manifests, strings.TrimSpace(rel.Manifest))
|
|
|
|
|
if !client.DisableHooks {
|
|
|
|
|
fileWritten := make(map[string]bool)
|
|
|
|
|
for _, m := range rel.Hooks {
|
|
|
|
|
if client.OutputDir == "" {
|
|
|
|
|
fmt.Fprintf(&manifests, "---\n# Source: %s\n%s\n", m.Path, m.Manifest)
|
|
|
|
@ -91,11 +90,10 @@ func newTemplateCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
|
|
|
|
|
if client.UseReleaseName {
|
|
|
|
|
newDir = filepath.Join(client.OutputDir, client.ReleaseName)
|
|
|
|
|
}
|
|
|
|
|
err = writeToFile(newDir, m.Path, m.Manifest, fileWritten[m.Path])
|
|
|
|
|
err = writeToFile(newDir, m.Path, m.Manifest, true)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
fileWritten[m.Path] = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|