tldr-pages / tldr-c-client

C command-line client for tldr pages
MIT License
296 stars 49 forks source link

Find version without using git #19

Closed danielcompton closed 7 years ago

danielcompton commented 7 years ago

When Homebrew installs a package, it removes the .git folder to make sure all builds are reproducible. When I run make, an error is printed:

fatal: Not a git repository (or any of the parent directories): .git

from the git describe command in the Makefile. It would be great if there was also a way to build the project and get the version without needing git. I'm not quite sure what the best approach is here.

Leandros commented 7 years ago

I'll take care of that, and once it's done do a new release for #18

Leandros commented 7 years ago

I'm now both checking if the current directory is a git repository, and check if git itself exists. If either isn't met, I'll use the hardcoded version string.

Implemented in commit b446daf95d41d715fa19475194440d0fa57bbea8