mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 19:11:25 +01:00
fix(release): lightweight tags in the snap build, version fallback, man pages for help topics, draft the 1.0.0 changelog
Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
9 files changed
+100
-12
No files matched your search
@@ -70,6 +70,24 @@ func generate(output string) error {
|
||||
if err := doc.GenManTree(root, header, filepath.Join(output, "man")); err != nil {
|
||||
return err
|
||||
}
|
||||
// Cobra skips the hidden help topics (environment, exit-codes, formatting); give them pages too.
|
||||
for _, topic := range app.ManualCommands(root) {
|
||||
if topic.Runnable() || topic.Annotations["tea.topic"] == "" {
|
||||
continue
|
||||
}
|
||||
var page strings.Builder
|
||||
if err := doc.GenMarkdownCustom(topic, &page, func(string) string { return "" }); err != nil {
|
||||
return err
|
||||
}
|
||||
name := "tea_" + topic.Name() + ".md"
|
||||
if err := os.WriteFile(filepath.Join(output, "reference", name), []byte(strings.TrimRight(page.String(), "\n")+"\n"), 0o644); err != nil {
|
||||
return err
|
||||
}
|
||||
topicHeader := &doc.GenManHeader{Title: "TEA-" + strings.ToUpper(topic.Name()), Section: "1", Date: &date, Source: "Tea", Manual: "Tea Manual"}
|
||||
if err := writeFile(filepath.Join(output, "man", "tea-"+topic.Name()+".1"), func(w io.Writer) error { return doc.GenMan(topic, topicHeader, w) }); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
completions := []struct {
|
||||
name string
|
||||
write func(io.Writer) error
|
||||
|
||||
Reference in new issue
Block a user