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 a version command line flag #295

Closed
benoitf opened this issue Nov 13, 2023 · 1 comment
Closed

Add a version command line flag #295

benoitf opened this issue Nov 13, 2023 · 1 comment

Comments

@benoitf
Copy link

benoitf commented Nov 13, 2023

I had several gvproxy binaries on my system, I suspect some of them were the same but signed differently etc

But it would be nice to have a --version or version parameter to get the version of that tool for

@cfergeau
Copy link
Collaborator

cfergeau commented Nov 13, 2023

See https://stackoverflow.com/questions/38087256/dynamic-version-from-git-with-go-get for a way of adding a version based on git versioning.

cfergeau added a commit to cfergeau/gvisor-tap-vsock that referenced this issue Nov 15, 2023
This sets the version to `git describe --always --dirty` using the
`-X github.com/containers/gvisor-tap-vsock/pkg/types.ModuleVersion`
linker flag.

This adds a -version flag to all binaries which currently have
command-line flags.

Correct versioning when installing from tarballs, and through `git
install` will be addressed in the next commits.

This fixes containers#295

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
cfergeau added a commit to cfergeau/gvisor-tap-vsock that referenced this issue Nov 22, 2023
This sets the version to `git describe --always --dirty` using the
`-X github.com/containers/gvisor-tap-vsock/pkg/types.ModuleVersion`
linker flag.

This adds a -version flag to all binaries which currently have
command-line flags.

Correct versioning when installing from tarballs, and through `git
install` will be addressed in the next commits.

This fixes containers#295

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
cfergeau added a commit to cfergeau/gvisor-tap-vsock that referenced this issue Nov 23, 2023
This sets the version to `git describe --always --dirty` using the
`-X github.com/containers/gvisor-tap-vsock/pkg/types.ModuleVersion`
linker flag.

This adds a -version flag to all binaries which currently have
command-line flags.

Correct versioning when installing from tarballs, and through `git
install` will be addressed in the next commits.

This fixes containers#295

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
cfergeau added a commit to cfergeau/gvisor-tap-vsock that referenced this issue Nov 23, 2023
This sets the version to `git describe --always --dirty` using the
`-X github.com/containers/gvisor-tap-vsock/pkg/types.ModuleVersion`
linker flag.

This adds a -version flag to all binaries which currently have
command-line flags.

Correct versioning when installing from tarballs, and through `git
install` will be addressed in the next commits.

This fixes containers#295

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
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

No branches or pull requests

2 participants