Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag Generation in the CLI #836

Merged
merged 34 commits into from Aug 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e01e3c5
Fix the unaligned indents for the commands that have no categories
mingrammer Mar 6, 2019
9766be8
get latest changes from master
mingrammer Mar 6, 2019
32ddef5
finish generation of flag types for cli package
asahasrabuddhe Aug 3, 2019
16c7a60
finish generation of flag types for altsrc package
asahasrabuddhe Aug 3, 2019
c133a5a
add explicit true/false choices for value and dest keys due to go def…
asahasrabuddhe Aug 3, 2019
add69c7
updated flag types generated courtesy fg cli
asahasrabuddhe Aug 3, 2019
d209be3
update go generate command
asahasrabuddhe Aug 3, 2019
9260850
Merge branch 'master' into flag-type-generation-golang
asahasrabuddhe Aug 3, 2019
d1ded77
rename utility from fg > flag-generator
asahasrabuddhe Aug 4, 2019
065fe9e
change structure to embed source json and template files
asahasrabuddhe Aug 4, 2019
2a08494
move around code
asahasrabuddhe Aug 4, 2019
c4fc88e
Merge branch 'flag-type-generation-golang' of https://github.com/urfa…
asahasrabuddhe Aug 4, 2019
c676ed4
indentation fixes in template
asahasrabuddhe Aug 4, 2019
86e1021
remove redundant go generate from altsrc
asahasrabuddhe Aug 4, 2019
04948f2
generate test with go generate
asahasrabuddhe Aug 4, 2019
826954c
update app name and remove version
asahasrabuddhe Aug 4, 2019
b6bfbe9
update appveyor to go 1.11, add support for code coverage generation …
asahasrabuddhe Aug 4, 2019
3655570
remove legacy version check code
asahasrabuddhe Aug 4, 2019
fb4cea5
add new generation logic to travis
asahasrabuddhe Aug 4, 2019
4b0a410
fix travis build
asahasrabuddhe Aug 4, 2019
8547458
remove zero mod fs
asahasrabuddhe Aug 4, 2019
58ae5eb
move entire build system to go
asahasrabuddhe Aug 4, 2019
7a6f3d4
fix tests
asahasrabuddhe Aug 4, 2019
798e1f3
fix spacing issue
asahasrabuddhe Aug 4, 2019
a7f0d86
add zero mod fs back and commit file with latest ts
asahasrabuddhe Aug 4, 2019
489d92d
add missing os package
asahasrabuddhe Aug 4, 2019
ac5c97b
add latest assets file
asahasrabuddhe Aug 4, 2019
adfe6a0
indenting fix
asahasrabuddhe Aug 6, 2019
5070d00
move packages slice to global scope
asahasrabuddhe Aug 6, 2019
e8bbb4c
remove unnecessary sprintf
asahasrabuddhe Aug 6, 2019
6ee5b89
move build.go to root
asahasrabuddhe Aug 6, 2019
c19938f
update ci commands
asahasrabuddhe Aug 6, 2019
24de27b
Merge branch 'master' into flag-type-generation-golang
asahasrabuddhe Aug 6, 2019
e2de8c7
update readme with correct error message, add 1.12 and 1.11 to travis
asahasrabuddhe Aug 7, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
@@ -1,2 +1,3 @@
*.coverprofile
node_modules/
vendor
35 changes: 21 additions & 14 deletions .travis.yml
Expand Up @@ -2,26 +2,33 @@ language: go
sudo: false
dist: trusty
osx_image: xcode8.3
go: 1.11.x
go:
- 1.11.x
- 1.12.x

os:
- linux
- osx
- linux
- osx

cache:
directories:
- node_modules
- node_modules

before_script:
- go get github.com/urfave/gfmrun/... || true
- go get golang.org/x/tools/cmd/goimports
- if [ ! -f node_modules/.bin/markdown-toc ] ; then
npm install markdown-toc ;
fi
- go get github.com/shurcooL/vfsgen || true
- go get github.com/shurcooL/httpfs/union || true
- go get github.com/urfave/gfmrun/... || true
- go get golang.org/x/tools/cmd/goimports
- if [ ! -f node_modules/.bin/markdown-toc ] ; then
npm install markdown-toc ;
fi
asahasrabuddhe marked this conversation as resolved.
Show resolved Hide resolved

script:
- ./runtests gen
- ./runtests vet
- ./runtests test
- ./runtests gfmrun
- ./runtests toc
- go run build.go generate
- go run build.go vet
- go run build.go test
- go run build.go gfmrun
- go run build.go toc

after_success:
- bash <(curl -s https://codecov.io/bash)
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -3,6 +3,7 @@ cli

[![Build Status](https://travis-ci.org/urfave/cli.svg?branch=master)](https://travis-ci.org/urfave/cli)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/rtgk5xufi932pb2v?svg=true)](https://ci.appveyor.com/project/urfave/cli)

[![GoDoc](https://godoc.org/github.com/urfave/cli?status.svg)](https://godoc.org/github.com/urfave/cli)
[![codebeat](https://codebeat.co/badges/0a8f30aa-f975-404b-b878-5fab3ae1cc5f)](https://codebeat.co/projects/github-com-urfave-cli)
[![Go Report Card](https://goreportcard.com/badge/urfave/cli)](https://goreportcard.com/report/urfave/cli)
Expand Down Expand Up @@ -888,7 +889,9 @@ Calling `App.Run` will not automatically call `os.Exit`, which means that by
default the exit code will "fall through" to being `0`. An explicit exit code
may be set by returning a non-nil error that fulfills `cli.ExitCoder`, *or* a
`cli.MultiError` that includes an error that fulfills `cli.ExitCoder`, e.g.:

<!-- {
"error": "Ginger croutons are not in the soup"
} -->
``` go
package main

Expand Down
3 changes: 0 additions & 3 deletions altsrc/altsrc.go

This file was deleted.