Skip to content

Commit

Permalink
Merge branch 'issue-878' of https://github.com/urfave/cli into issue-878
Browse files Browse the repository at this point in the history
  • Loading branch information
asahasrabuddhe committed Sep 11, 2019
2 parents c6ee3b4 + 82a84fc commit 056aef1
Show file tree
Hide file tree
Showing 30 changed files with 1,490 additions and 2,209 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ before_script:
- go mod tidy

script:
- go run build.go generate
- go run build.go vet
- go run build.go test
- go run build.go gfmrun
Expand Down
3 changes: 0 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@ install:
- set PATH=%GOPATH%\bin;C:\go\bin;%PATH%
- go version
- go env
- go get github.com/shurcooL/vfsgen
- go get github.com/shurcooL/httpfs/union
- go get github.com/urfave/gfmrun/...
- go get -v -t ./...

build_script:
- go run build.go generate
- go run build.go vet
- go run build.go test
- go run build.go gfmrun
23 changes: 0 additions & 23 deletions build.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ func main() {
Name: "toc",
Action: TocActionFunc,
},
cli.Command{
Name: "generate",
Action: GenActionFunc,
},
}

err := app.Run(os.Args)
Expand Down Expand Up @@ -166,22 +162,3 @@ func TocActionFunc(_ *cli.Context) error {

return nil
}

func GenActionFunc(_ *cli.Context) error {
err := runCmd("go", "generate", "flag-gen/main.go")
if err != nil {
return err
}

err = runCmd("go", "generate", "cli.go")
if err != nil {
return err
}

err = runCmd("git", "diff", "--exit-code")
if err != nil {
return err
}

return nil
}
3 changes: 3 additions & 0 deletions docs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ func testApp() *App {
Usage: "retrieve generic information",
}, {
Name: "some-command",
}, {
Name: "hidden-command",
Hidden: true,
}}
app.UsageText = "app [first_arg] [second_arg]"
app.Usage = "Some app"
Expand Down
4 changes: 4 additions & 0 deletions fish.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ func (a *App) prepareFishCommands(commands []Command, allCommands *[]string, pre
for i := range commands {
command := &commands[i]

if command.Hidden {
continue
}

var completion strings.Builder
completion.WriteString(fmt.Sprintf(
"complete -r -c %s -n '%s' -a '%s'",
Expand Down
1 change: 0 additions & 1 deletion flag-gen/.gitignore

This file was deleted.

55 changes: 0 additions & 55 deletions flag-gen/assets_generate.go

This file was deleted.

214 changes: 0 additions & 214 deletions flag-gen/assets_vfsdata.go

This file was deleted.

9 changes: 0 additions & 9 deletions flag-gen/go.mod

This file was deleted.

9 changes: 0 additions & 9 deletions flag-gen/go.sum

This file was deleted.

Loading

0 comments on commit 056aef1

Please sign in to comment.