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

Released version of moq does not print correct version #143

Closed
breml opened this issue Feb 9, 2021 · 5 comments
Closed

Released version of moq does not print correct version #143

breml opened this issue Feb 9, 2021 · 5 comments

Comments

@breml
Copy link
Contributor

breml commented Feb 9, 2021

I just downloaded the pre-compiled version of moq v0.2.0 from Github releases and it does not print the correct version:

$ moq -version
moq version dev

Expected:

$ moq -version
moq version v0.2.0
@sudo-suhas
Copy link
Collaborator

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?

@matryer
Copy link
Owner

matryer commented Feb 14, 2021

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?

@caarlos0
Copy link

Hey!

Your goreleaser config is setting Version (capital V) instead of version... probably that's the issue...

@matryer
Copy link
Owner

matryer commented Feb 14, 2021

@caarlos0 Thanks for your help. That's it, the variable is unexported in main and they don't match.

matryer added a commit that referenced this issue Feb 14, 2021
@matryer
Copy link
Owner

matryer commented Feb 14, 2021

Verified, this is fixed. Thanks everyone.

➜  moq_0.2.1_macOS_x86_64 ./moq -version
moq version 0.2.1

@matryer matryer closed this as completed Feb 14, 2021
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

4 participants