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

Alias 'ipfs --version' to 'ipfs version' #2990

Merged
merged 2 commits into from
Aug 4, 2016

Conversation

csasarak
Copy link
Contributor

Addresses Issue #2976. This is a pretty simple method since it looks like the main ipfs command pretty much just parses and launches the others. If you think it is likely that we'll have more 'alias' type things that people will want on ipfs (not its subcommands) in the future, I can probably write something (like a dict) mapping aliases to real commands.

@Kubuxu
Copy link
Member

Kubuxu commented Jul 26, 2016

Please introduce sharness test case for it, so if we do refactor of it in future it doesn't get lost.

@csasarak
Copy link
Contributor Author

I'll look into that tonight, thanks!

@RichardLitt
Copy link
Member

Thank you, @csasarak!

@RichardLitt RichardLitt added need/author-input Needs input from the original author need_tests labels Jul 26, 2016
csasarak added 2 commits July 26, 2016 19:41
License: MIT
Signed-off-by: Chris Sasarak <chris.sasarak@gmail.com>
1. Test that ipfs --version has a 0 exit status
2. Check the ipfs --version output matches ipfs version

License: MIT
Signed-off-by: Chris Sasarak <chris.sasarak@gmail.com>
@csasarak
Copy link
Contributor Author

I've added two tests that I could think of, details are in the commit message.

@whyrusleeping
Copy link
Member

LGTM

@whyrusleeping whyrusleeping added need/review Needs a review and removed need_tests need/author-input Needs input from the original author labels Jul 27, 2016
@Kubuxu
Copy link
Member

Kubuxu commented Jul 27, 2016

SGTM

@RichardLitt RichardLitt added RFM and removed need/review Needs a review labels Jul 27, 2016
@whyrusleeping whyrusleeping merged commit 1eb94e6 into ipfs:master Aug 4, 2016
ipfs version > version.txt &&
ipfs --version > version2.txt &&
diff version2.txt version.txt ||
test_fsh ipfs --version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use test_cmp version.txt version2.txt instead of those last two lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants