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

Add new version checker #232

Merged
merged 1 commit into from
Aug 18, 2015
Merged

Add new version checker #232

merged 1 commit into from
Aug 18, 2015

Conversation

mgood
Copy link
Contributor

@mgood mgood commented Aug 17, 2015

Checks for new versions with the "usage" service and automatically displays a
standard version message when the "--version" flag is passed.

This is an example of how we could use the Checker interface I added to the usage package to automatically handle the "--version" flag to provide a nice version message with information on when the version is out of date.

@progrium
Copy link
Contributor

Cool. Does the Checker interface also work with explicit version commands? (ie, --version flag is not used)

@mgood
Copy link
Contributor Author

mgood commented Aug 17, 2015

No, I guess I could include an implicit one that checks for --version and an one you can call to print it explicitly.

@mgood
Copy link
Contributor Author

mgood commented Aug 17, 2015

Checks for new versions with the "usage" service and automatically displays a
standard version message when the "--version" flag is passed.
@mgood
Copy link
Contributor Author

mgood commented Aug 18, 2015

I changed it back to checking for --version in main() instead of PrintVersion.

progrium added a commit that referenced this pull request Aug 18, 2015
@progrium progrium merged commit 4ebfa22 into master Aug 18, 2015
@mattatcha mattatcha deleted the usage branch April 19, 2016 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants