Skip to content

Commit

Permalink
feat: aur, man, dep updates
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos A Becker <[email protected]>
  • Loading branch information
caarlos0 committed Jan 22, 2022
1 parent 6f2652f commit 604d6d0
Show file tree
Hide file tree
Showing 16 changed files with 50 additions and 249 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ coverage.out
snap.login
completions/
*.log
manpages
11 changes: 6 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ includes:
- from_url:
url: https://raw.githubusercontent.com/caarlos0/goreleaserfiles/main/build.yml
- from_url:
url: https://raw.githubusercontent.com/caarlos0/goreleaserfiles/main/package_with_completions.yml
url: 'https://raw.githubusercontent.com/caarlos0/goreleaserfiles/main/package_with_completions_and_manpages.yml?b=4&cache=0'
- from_url:
url: https://raw.githubusercontent.com/caarlos0/goreleaserfiles/main/release.yml

furies:
- account: caarlos0

snapcrafts:
- publish: true
summary: '{{ .description }}'
description: '{{ .description }}'
grade: stable
- publish: true
summary: '{{ .description }}'
description: '{{ .description }}'
grade: stable

2 changes: 1 addition & 1 deletion cmd/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

var docsCmd = &cobra.Command{
Use: "docs",
Short: "Generates donuts's command line docs",
Short: "Generates org-stats's command line docs",
SilenceUsage: true,
DisableFlagsInUseLine: true,
Hidden: true,
Expand Down
28 changes: 28 additions & 0 deletions cmd/man.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package cmd

import (
"fmt"
"os"

"github.com/muesli/mango/mcobra"
"github.com/muesli/roff"
"github.com/spf13/cobra"
)

var manCmd = &cobra.Command{
Use: "man",
Short: "Generates org-stats's command line manpages",
SilenceUsage: true,
DisableFlagsInUseLine: true,
Hidden: true,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
manPage, err := mcobra.NewManPageFromCobra(1, cmd.Root())
if err != nil {
return err
}

_, err = fmt.Fprint(os.Stdout, manPage.Build(roff.NewDocument()))
return err
},
}
4 changes: 3 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ func init() {
rootCmd.Flags().BoolVar(&includeReviews, "include-reviews", false, "include pull request reviews in the stats")
rootCmd.Flags().StringVar(&csvPath, "csv-path", "", "path to write a csv file with all data collected")

rootCmd.AddCommand(versionCmd, docsCmd)
rootCmd.CompletionOptions.HiddenDefaultCmd = true

rootCmd.AddCommand(versionCmd, docsCmd, manCmd)
}

var rootCmd = &cobra.Command{
Expand Down
43 changes: 0 additions & 43 deletions docs/org-stats.md

This file was deleted.

25 changes: 0 additions & 25 deletions docs/org-stats_completion.md

This file was deleted.

44 changes: 0 additions & 44 deletions docs/org-stats_completion_bash.md

This file was deleted.

35 changes: 0 additions & 35 deletions docs/org-stats_completion_fish.md

This file was deleted.

32 changes: 0 additions & 32 deletions docs/org-stats_completion_powershell.md

This file was deleted.

42 changes: 0 additions & 42 deletions docs/org-stats_completion_zsh.md

This file was deleted.

18 changes: 0 additions & 18 deletions docs/org-stats_version.md

This file was deleted.

2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ require (
github.com/charmbracelet/lipgloss v0.4.0
github.com/google/go-github/v39 v39.2.0
github.com/matryer/is v1.4.0
github.com/muesli/mango v0.0.0-20220118122812-f367188b892e
github.com/muesli/roff v0.1.0
github.com/spf13/cobra v1.3.0
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
)
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,13 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b h1:1XF24mVaiu7u+CFywTdcDo2ie1pzzhwjt6RHqzpMU34=
github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b/go.mod h1:fQuZ0gauxyBcmsdE3ZT4NasjaRdxmbCS0jRHsrWu3Ho=
github.com/muesli/mango v0.0.0-20220118122812-f367188b892e h1:ykZ/Hqqvqm2lmZ1YoruxTWaOb90IKlkMuT0Io9baO+A=
github.com/muesli/mango v0.0.0-20220118122812-f367188b892e/go.mod h1:r40g5Hx6ZzbjDW0GZhCpSX2Wyt9SPSDRoQGaODqxSz4=
github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68/go.mod h1:Xk+z4oIWdQqJzsxyjgl3P22oYZnHdZ8FFTHAQQt5BMQ=
github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s=
github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8=
github.com/muesli/roff v0.1.0 h1:YD0lalCotmYuF5HhZliKWlIx7IEhiXeSfq7hNjFqGF8=
github.com/muesli/roff v0.1.0/go.mod h1:pjAHQM9hdUUwm/krAfrLGgJkXJ+YuhtsfZ42kieB2Ig=
github.com/muesli/termenv v0.9.0 h1:wnbOaGz+LUR3jNT0zOzinPnyDaCZUQRZj9GxK8eRVl8=
github.com/muesli/termenv v0.9.0/go.mod h1:R/LzAKf+suGs4IsO95y7+7DpFHO0KABgnZqtlyx2mBw=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
Expand Down
3 changes: 0 additions & 3 deletions scripts/docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ fi

rm -rf ./docs/*.md

git checkout -- go.*
go mod edit -replace github.com/spf13/cobra=github.com/caarlos0/cobra@completions-md
go mod tidy
go run . docs

"$SED" \
Expand Down
5 changes: 5 additions & 0 deletions scripts/manpages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
set -e
rm -rf manpages
mkdir manpages
go run . man | gzip -c >manpages/org-stats.1.gz

0 comments on commit 604d6d0

Please sign in to comment.