Skip to content

Commit ed8850d

Browse files
authored
remove progress bar for doc generation. (#1323)
We only print now when the verbose flag `-v` is given. Otherwise we print nothing and exit 0
1 parent 47598b0 commit ed8850d

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

cmd/src/doc.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,8 @@ Examples:
6565
"repos": &reposCommands,
6666
}
6767

68-
pending := out.Pending(output.Line("", output.StylePending, "Rendering Markdown..."))
69-
count := 0
7068
rootSubcommands := map[string]string{}
71-
defer func() {
72-
pending.Complete(output.Linef(output.EmojiSuccess, output.StyleSuccess, "%d files rendered under %s", count, *outputFlag))
73-
}()
69+
count := 0
7470
for groupName, cmdr := range commanders {
7571
subcommands := map[string]string{}
7672

@@ -86,7 +82,6 @@ Examples:
8682
if fqcn == "doc" || fqcn == "publish" {
8783
continue
8884
}
89-
pending.Update(fqcn)
9085

9186
// If this name appears in our commanders map, then this isn't a
9287
// real command, and we'll handle it differently.
@@ -145,7 +140,7 @@ Examples:
145140
}
146141

147142
for _, md := range mdFiles {
148-
pending.Update(md.Name)
143+
out.Verbosef("writing: %s", md.Name)
149144
docPath := path.Join(dstDir, md.Name)
150145
if err := os.MkdirAll(path.Dir(docPath), 0755); err != nil {
151146
return err
@@ -171,6 +166,7 @@ Examples:
171166
return err
172167
}
173168
count++
169+
out.VerboseLine(output.Linef(output.EmojiSuccess, output.StyleSuccess, "%d files rendered under %s", count, *outputFlag))
174170

175171
return nil
176172
}

0 commit comments

Comments
 (0)