Skip to content
Discussion options

You must be logged in to vote

This is not a bug - it's the expected behavior.

When you see ov version dev rev:HEAD, it means you built the binary using go build or go install directly.

To display the correct version information, you need to build using the Makefile:

make build
# or
make install

Why this happens

The Makefile sets LDFLAGS to inject version information at build time:

LDFLAGS := "-X main.Version=$(shell git describe --tags --abbrev=0 --always) -X main.Revision=$(shell git rev-parse --verify --short HEAD)"

This sets:

  • main.Version to the latest git tag
  • main.Revision to the current commit hash (short version)

When you use go build or go install directly without these flags, the default values defined in ma…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@groutoutlook
Comment options

@noborus
Comment options

Answer selected by groutoutlook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants