mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01: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
+13
-4
@@ -40,10 +40,7 @@ func (a *application) manCommand() *cobra.Command {
|
||||
return err
|
||||
}
|
||||
if len(args) == 0 {
|
||||
for _, child := range page.Commands() {
|
||||
if child.Hidden {
|
||||
continue
|
||||
}
|
||||
for _, child := range ManualCommands(page) {
|
||||
if err := render(child); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -67,3 +64,15 @@ func ManualDate(getenv func(string) string) time.Time {
|
||||
}
|
||||
return time.Date(2026, time.January, 1, 0, 0, 0, 0, time.UTC)
|
||||
}
|
||||
|
||||
// ManualCommands lists the subcommands that get a page in the manual: the available commands,
|
||||
// without the generated help command, and the help topics such as environment and exit-codes.
|
||||
func ManualCommands(page *cobra.Command) []*cobra.Command {
|
||||
var children []*cobra.Command
|
||||
for _, child := range page.Commands() {
|
||||
if child.Annotations[topicAnnotation] != "" || (child.IsAvailableCommand() && !child.IsAdditionalHelpTopicCommand()) {
|
||||
children = append(children, child)
|
||||
}
|
||||
}
|
||||
return children
|
||||
}
|
||||
Reference in new issue
Block a user