-
Notifications
You must be signed in to change notification settings - Fork 22
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
Improve argument parsing, fix style #3
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is done anticipating further refactoring.
This is done anticipating further refactoring
jcfr
force-pushed
the
improve-argument-parsing
branch
from
February 1, 2017 22:35
f70f4a0
to
4a7d99f
Compare
jcfr
force-pushed
the
improve-argument-parsing
branch
from
February 1, 2017 22:35
4a7d99f
to
cbeb5c4
Compare
jcfr
force-pushed
the
improve-argument-parsing
branch
2 times, most recently
from
February 2, 2017 05:08
61dcec8
to
94de874
Compare
jcfr
force-pushed
the
improve-argument-parsing
branch
3 times, most recently
from
February 2, 2017 05:29
a8a630c
to
d4b30c0
Compare
…set" * Install new executable named "githubrelease" supporting both "release" and "asset" commands. * Support for directly use of "github_release.py" * Multi-parser usage was adapted from https://chase-seibert.github.io/blog/2014/03/21/python-multilevel-argparse.html Examples: python github_release.py release j0057/iplbapi list githubrelease release j0057/iplbapi list githubrelease asset j0057/iplbapi download
jcfr
force-pushed
the
improve-argument-parsing
branch
from
February 2, 2017 05:35
d4b30c0
to
1fbd978
Compare
This allows to directly create a published release
jcfr
force-pushed
the
improve-argument-parsing
branch
from
February 2, 2017 07:01
ecf7f6b
to
27c6010
Compare
This allows to directly create a pre-release
This will be useful to support command parameter with dashes (e.g --do-foo). It ensures that the corresponding value is retrieved using `do_foo`.
…eter When specified, github_release does not upload or erase packages but acts like it was done.
When specified, matching packages will be excluded from the subset already matched by the provided selection "pattern".
jcfr
added a commit
that referenced
this pull request
Feb 11, 2017
Here are few examples of output: ``` $ githubrelease release jcfr/sandbox list release 'nightly' info Tag name : nightly Name : nightly (updated on 20170212) ID : 5427736 Created : 2017-02-01T07:31:19Z URL : https://github.com/jcfr/sandbox/releases/tag/nightly Author : jcfr Is published : True Is prerelease : True Asset #0 name : sandbox-4.12.0.dev20170212-cp27-cp27m-win32.whl size : 52 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp27-cp27m-win32.whl Downloads : 0 Asset #1 name : sandbox-4.12.0.dev20170212-cp27-cp27m-win_amd64.whl size : 56 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp27-cp27m-win_amd64.whl Downloads : 0 Asset #2 name : sandbox-4.12.0.dev20170212-cp34-cp34m-win32.whl size : 52 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp34-cp34m-win32.whl Downloads : 0 Asset #3 name : sandbox-4.12.0.dev20170212-cp34-cp34m-win_amd64.whl size : 56 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp34-cp34m-win_amd64.whl Downloads : 0 Asset #4 name : sandbox-4.12.0.dev20170212-cp35-cp35m-win32.whl size : 52 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp35-cp35m-win32.whl Downloads : 0 Asset #5 name : sandbox-4.12.0.dev20170212-cp35-cp35m-win_amd64.whl size : 56 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp35-cp35m-win_amd64.whl Downloads : 0 Asset #6 name : sandbox-4.12.0.dev20170212-cp36-cp36m-win32.whl size : 52 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp36-cp36m-win32.whl Downloads : 0 Asset #7 name : sandbox-4.12.0.dev20170212-cp36-cp36m-win_amd64.whl size : 56 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp36-cp36m-win_amd64.whl Downloads : 0 ``` ``` $ githubrelease ref jcfr/sandbox list --verbose Reference 'refs/heads/master' Object type : commit sha : 0616014562f225a86469fffe39219536a53b56b1 Reference 'refs/tags/nightly' Object type : commit sha : 0616014562f225a86469fffe39219536a53b56b1 ``` ``` $ githubrelease release jcfr/sandbox create my-tag created 'my-tag' release Tag name : my-tag ID : 5427757 Created : 2017-02-11T06:23:39Z URL : https://github.com/jcfr/sandbox/releases/tag/untagged-cfccf5564b71b4d4a2a0 Author : jcfr Is published : False Is prerelease : False ```
jcfr
added a commit
that referenced
this pull request
Feb 11, 2017
Here are few examples of output: ``` $ githubrelease release jcfr/sandbox list release 'nightly' info Tag name : nightly Name : nightly (updated on 20170212) ID : 5427736 Created : 2017-02-01T07:31:19Z URL : https://github.com/jcfr/sandbox/releases/tag/nightly Author : jcfr Is published : True Is prerelease : True Asset #0 name : sandbox-4.12.0.dev20170212-cp27-cp27m-win32.whl size : 52 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp27-cp27m-win32.whl Downloads : 0 Asset #1 name : sandbox-4.12.0.dev20170212-cp27-cp27m-win_amd64.whl size : 56 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp27-cp27m-win_amd64.whl Downloads : 0 Asset #2 name : sandbox-4.12.0.dev20170212-cp34-cp34m-win32.whl size : 52 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp34-cp34m-win32.whl Downloads : 0 Asset #3 name : sandbox-4.12.0.dev20170212-cp34-cp34m-win_amd64.whl size : 56 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp34-cp34m-win_amd64.whl Downloads : 0 Asset #4 name : sandbox-4.12.0.dev20170212-cp35-cp35m-win32.whl size : 52 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp35-cp35m-win32.whl Downloads : 0 Asset #5 name : sandbox-4.12.0.dev20170212-cp35-cp35m-win_amd64.whl size : 56 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp35-cp35m-win_amd64.whl Downloads : 0 Asset #6 name : sandbox-4.12.0.dev20170212-cp36-cp36m-win32.whl size : 52 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp36-cp36m-win32.whl Downloads : 0 Asset #7 name : sandbox-4.12.0.dev20170212-cp36-cp36m-win_amd64.whl size : 56 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp36-cp36m-win_amd64.whl Downloads : 0 ``` ``` $ githubrelease ref jcfr/sandbox list --verbose Reference 'refs/heads/master' Object type : commit sha : 0616014562f225a86469fffe39219536a53b56b1 Reference 'refs/tags/nightly' Object type : commit sha : 0616014562f225a86469fffe39219536a53b56b1 ``` ``` $ githubrelease release jcfr/sandbox create my-tag created 'my-tag' release Tag name : my-tag ID : 5427757 Created : 2017-02-11T06:23:39Z URL : https://github.com/jcfr/sandbox/releases/tag/untagged-cfccf5564b71b4d4a2a0 Author : jcfr Is published : False Is prerelease : False ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In addition of fixing some stylistic issues, this PR also implements the following features:
github-release
andgithub-asset
executableGITHUB_TOKEN
environment variable as an alternative to the~/.netrc
githubrelease
) or directly usinggithub_release.py
script: