Skip to content

Add arguments "--version" and "--help" for driver binary#34

Merged
legal90 merged 2 commits intoParallels:masterfrom
legal90:f-version
Dec 29, 2015
Merged

Add arguments "--version" and "--help" for driver binary#34
legal90 merged 2 commits intoParallels:masterfrom
legal90:f-version

Conversation

@legal90
Copy link
Copy Markdown
Collaborator

@legal90 legal90 commented Dec 29, 2015

Plugin binaries are not intended to be invoked directly. But we need --version just in order to detect driver version.

This is how it works:

$ ./bin/docker-machine-driver-parallels --version
docker-machine-driver-parallels version 1.1.1, build 006b069
$ ./bin/docker-machine-driver-parallels --help
This is a Docker Machine plugin for Parallels Desktop.
Plugin binaries are not intended to be invoked directly.
Please use this plugin through the main 'docker-machine' binary.

Version: 1.1.1, build 006b069

Author:
  Parallels IP Holdings GmbH - <https://github.com/Parallels/docker-machine-parallels/>

Options:
  --help, -h    show help
  --version, -v print the version

Commands:
  help, h   Shows a list of commands or help for one command

Without arguments there are the same output as before, e.q. it is expected that this binary will be invoked by docker-machine with pre-configured environment:

$ ./bin/docker-machine-driver-parallels
This is a Docker Machine plugin binary.
Plugin binaries are not intended to be invoked directly.
Please use this plugin through the main 'docker-machine' binary.
(API version: 1)

@legal90
Copy link
Copy Markdown
Collaborator Author

legal90 commented Dec 29, 2015

cc: @racktear

@knazarov
Copy link
Copy Markdown

Why do you need git sha in version information?

@legal90
Copy link
Copy Markdown
Collaborator Author

legal90 commented Dec 29, 2015

@racktear I just want to follow conventions - this version output format is used in all Docker tools: docker-archive-public/docker.machine#2514

And it is also useful for debugging custom builds. It is important to know the revision from which the binary was built if we try to reproduce some error.

legal90 added a commit that referenced this pull request Dec 29, 2015
Add arguments "--version" and "--help" for driver binary
@legal90 legal90 merged commit 875b076 into Parallels:master Dec 29, 2015
@legal90 legal90 deleted the f-version branch December 29, 2015 19:07
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