conan: Cannot retrieve git SHA when using `exports_sources`
I am using a conanfile inside of the source repository, and the build system uses git commands to find out the current SHA to tag the library with it, so we know for sure which version we are dealing with.
However, this does not work even if I manually specify “.git” in my exports
attribute, because conans/client/file_copier.py
has a check to prevent copying “.git” and “.svn” folders.
This prevents me from retrieving the SHA if I use the conanfile in-source, and forces me to use a source()
method that does a git clone
.
Is there a way I could work around this copy restriction ?
Thanks
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (9 by maintainers)
Ok, here it goes. 😃
It seems to work here. What do you think?