tomnomnom / gron

Make JSON greppable!
MIT License
13.73k stars 325 forks source link

v0.7.1 does not report its own version #97

Open rperce opened 2 years ago

rperce commented 2 years ago

Replicata

╭─(robert)───(~/scratch)
╰──╼ curl -sSLO https://github.com/tomnomnom/gron/releases/download/v0.7.1/gron-linux-amd64-0.7.1.tgz
╭─(robert)───(~/scratch)
╰──╼ tar xzvf gron-linux-amd64-0.7.1.tgz
gron
╭─(robert)───(~/scratch)
╰──╼ ./gron --version
gron version dev

Expectata

gron --version should report its release number, not dev. Compare with the previous version:

╭─(robert)───(~/scratch)
╰──╼ curl -sSLO https://github.com/tomnomnom/gron/releases/download/v0.6.1/gron-linux-amd64-0.6.1.tgz
╭─(robert)───(~/scratch)
╰──╼ tar xzvf gron-linux-amd64-0.6.1.tgz
gron
╭─(robert)───(~/scratch)
╰──╼ ./gron --version
gron version 0.6.1
dotcs commented 2 years ago

The same happens for me.

Is this because the argument -ldflags "-X main.gronVersion=${VERSION}" has been removed from the release script?

https://github.com/tomnomnom/gron/commit/badf401da553eb41b7ffde4be6a64809ed0ed846#diff-e3b83f8b89d67c5106cf02b79df582265e774eb93bbffb7e2ca26f05c73776dfL55

gbolo commented 1 year ago

The same happens for me.

Is this because the argument -ldflags "-X main.gronVersion=${VERSION}" has been removed from the release script?

badf401#diff-e3b83f8b89d67c5106cf02b79df582265e774eb93bbffb7e2ca26f05c73776dfL55

yes that's the reason. I was probably a mistake. @tomnomnom ^^

mloskot commented 1 year ago

I noticed the same issue while packaging gron official Windows binaries for winget (see https://github.com/tomnomnom/gron/pull/109)

image

It would be helpful if the official binaries reported 0.7.1 instead of dev.