bloznelis / typioca

Cozy typing speed tester in terminal
MIT License
750 stars 22 forks source link

[suggestion] typioca -v #28

Closed tripplehelix closed 2 years ago

tripplehelix commented 2 years ago

Would be nice to either show version number in the program or be able to run typioca -v

bloznelis commented 2 years ago

Thanks for the suggestion :clap:

tripplehelix commented 2 years ago

image ...

bloznelis commented 2 years ago

Hmm, that is weird. Which OS are you running this on @tripplehelix ?

tripplehelix commented 2 years ago

image

tripplehelix commented 2 years ago

Still not getting a version number with latest release.

bloznelis commented 2 years ago

How are you building the package, because in all envs that I tested this it behaves as expected.

Try running these commands from the project root:

$ git describe --abbrev=0 --tags
1.2.3

$ make build

$ ./execs/typioca -v
typioca  1.2.3
tripplehelix commented 2 years ago

image

I usually pull the exec out into .local/bin/

This is via git clone, rather than downloading from releases.

bloznelis commented 2 years ago

Hmm, that is pretty weird. As make does the same command you did (and it showed correctly 1.2.3) here https://github.com/bloznelis/typioca/blob/master/Makefile#L6 and injects it into binary via compiler flags.