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
[BUG] misformatted version string when installing from the release tarballs #297
Comments
Hi! Thanks for reporting this! I agree, this is a bad behavior that should be fixed.
It seems a suited solution! We could also capture the result variable and check if it is not 0, like:
(Also, it would be great if you could open same PR on clightd too, thanks!) |
Using the git command itself makes it a build-time dependency, which I'd also like to avoid when using source tarballs to install instead of the git tree. I'm afraid using the exit code would lead to a different error during build if the source tarballs are used and git is not installed on the system. That's why I ended up with an approach which uses something else than git to check if the directory looks like a git repo (such as
Great, thanks, will do both PRs shortly! |
I'm glad it was acceptable in both places, thank again for merging! |
You're welcome, thanks for proposing the patches indeed :) |
Clight version the issue has been seen with:
Used distribution:
Describe the bug
When unpacking the release tarballs to build Clight, the extracted content is not a git repository, therefore cmake complains about "fatal: not a git repository" when trying to determing the git commit hash.
It results in an empty
GIT_HASH
variable, causing the version string to miss the trailing git commit id, and look like4.11-
Expected behavior
I'd like Clight to have a clean build process without errors/warnings, and to report properly formatted version strings regardless of how one obtains the source code (from git or from release tarballs).
To Reproduce
cmake .
in the extracted source directory.fatal: not a git repository
in the output.clight -v
to get the version string.-
character.Given the build-time issue, I decided not to attach a verbose Clight log from runtime for now. It contains the same version string though, so let me know if that's relevant after all.
Additional notes:
The text was updated successfully, but these errors were encountered: