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:
bircni committed 2026-10-18 20:01:14 +02:00
1 parent 90df795abb
commit f7ed123cec
9 files changed
+100 -12

No files matched your search

+13 -4
View File
@@ -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
}
+9
View File
@@ -66,3 +66,12 @@ func TestCanceledManDoesNotPublishOutputFile(t *testing.T) {
require.True(t, os.IsNotExist(err))
require.Empty(t, out.String())
}
func TestManIncludesHelpTopicsButNotHelpCommands(t *testing.T) {
deps, out, _ := testDeps(t)
require.NoError(t, Execute(context.Background(), deps, []string{"man"}))
manual := out.String()
require.Contains(t, manual, `.TH "TEA-ENVIRONMENT"`)
require.Contains(t, manual, `.TH "TEA-EXIT-CODES"`)
require.NotContains(t, manual, `.TH "TEA-PR-HELP"`)
}