Closed breml closed 3 years ago
I had used goreleaser to build the binaries. Not sure why the version was not passed in using ldflags
. Steps followed:
$ git tag --annotate --message="Release v0.2.0" v0.2.0
$ goreleaser release --rm-dist
@matryer Is there anything wrong with the above steps?
Those commands are slightly different to what I use, see the releasing.md
But I don't know why that would make a difference. Maybe @caarlos0 has an idea?
Hey!
Your goreleaser config is setting Version (capital V) instead of version... probably that's the issue...
@caarlos0 Thanks for your help. That's it, the variable is unexported in main and they don't match.
Verified, this is fixed. Thanks everyone.
➜ moq_0.2.1_macOS_x86_64 ./moq -version
moq version 0.2.1
I just downloaded the pre-compiled version of
moq
v0.2.0 from Github releases and it does not print the correct version:Expected: