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

feat(versioncmd): adds version command to return current version #431

Merged
merged 1 commit into from
Jan 10, 2019

Conversation

drubin
Copy link
Contributor

@drubin drubin commented Dec 10, 2018

Adds a version command so it matches all a bunch of other tools.

garden version and garden -v return the same result.

garden-service/src/cli/helpers.ts Show resolved Hide resolved
garden-service/src/cli/helpers.ts Outdated Show resolved Hide resolved
docs/reference/commands.md Outdated Show resolved Hide resolved
@drubin drubin force-pushed the version-cmd branch 2 times, most recently from 0378a9a to c79aeb1 Compare January 7, 2019 12:52
@eysi09
Copy link
Collaborator

eysi09 commented Jan 9, 2019

Actually, setting the implicitCommand flag to true in this line allows you to call garden version with the desired outcome. However, that won't print version in the command list when running garden --help. Same applies to help. My apologies for not having noticed this sooner.

@drubin
Copy link
Contributor Author

drubin commented Jan 9, 2019

@eysi09 I tried that too. I would prefer not to tie us to sywac more than we have to since #393

Also I see garden -v and garden version differing slightly as things progress to client/server/api model.

docker -v
Docker version 18.09.0, build 4d60db4

vs

docker version
Client: Docker Engine - Community
 Version:           18.09.0
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        4d60db4
 Built:             Wed Nov  7 00:47:43 2018
 OS/Arch:           darwin/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.0
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       4d60db4
  Built:            Wed Nov  7 00:55:00 2018
  OS/Arch:          linux/amd64
  Experimental:     true

@edvald
Copy link
Collaborator

edvald commented Jan 9, 2019

Do we need to keep the -v flag? I tend to confuse it as a short-hand for --verbose which I got used to using some other tools.

@drubin
Copy link
Contributor Author

drubin commented Jan 9, 2019

I don't have a preference, although right now I would err on leaving it there. Would want to make it as easy as possible to get the version out also feels a bit premature to just remove it.

@drubin drubin merged commit 2bf433b into master Jan 10, 2019
@drubin drubin deleted the version-cmd branch January 11, 2019 12:56
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.

3 participants