New ๐ŸŒŠ wave for @helm

Commit 1902dc40

1902dc400f04Merged

zhilyaev <[email protected]> ยท 5 years ago ยท 2 files ยท ~2 modified

Description

fix status output

Details

Commit
1902dc400f04
Parent
8a48238c1a6d

pkg/plan/export.gomodifiedView file

@@ -6,7 +6,7 @@
66
77 "github.com/helmwave/helmwave/pkg/helper"
88 "github.com/helmwave/helmwave/pkg/parallel"
9- copyDir "github.com/otiai10/copy"
9+ dir "github.com/otiai10/copy"
1010 )
1111
1212 // Export allows save plan to file
@@ -73,6 +73,22 @@
7373 }
7474
7575 func (p *Plan) exportGraphMD() error {
76+ if len(p.body.Releases) == 0 {
77+ return nil
78+ }
79+
80+ found := false
81+ for _, rel := range p.body.Releases {
82+ if len(rel.DependsOn) > 0 {
83+ found = true
84+ break
85+ }
86+ }
87+
88+ if !found {
89+ return nil
90+ }
91+
7692 const filename = "graph.md"
7793 f, err := helper.CreateFile(filepath.Join(p.dir, filename))
7894 if err != nil {
@@ -106,12 +122,12 @@
106122 }
107123
108124 // It doesnt work if workdir is mount.
109- //return os.Rename(
110- // filepath.Join(p.tmpDir, Values),
111- // filepath.Join(p.dir, Values),
112- //)
125+ // return os.Rename(
126+ // filepath.Join(p.tmpDir, Values),
127+ // filepath.Join(p.dir, Values),
128+ // )
113129
114- return copyDir.Copy(
130+ return dir.Copy(
115131 filepath.Join(p.tmpDir, Values),
116132 filepath.Join(p.dir, Values),
117133 )