Closed Byloth closed 5 years ago
Hi @Byloth,
Thanks for the report and the fix. git rev-parse --git-dir
indeed returns a relative path and --show-toplevel
is a much better solution.
That said, I want take the opportunity to stress that the only public API of setuptools-odoo
, beyond using it as a setuptools
plugin, is setuptools.get_addon_metadata()
. So anything else is subject to change without notice.
There is a strange case in which the original function does not work.
If you create a script from scratch, import
setuptools_odoo
as a normal Python module and then you callget_git_postversion
(or simplyget_git_root
) it will be related to the directory in which you run your script.For example...
If you run your script from inside your GIT repository, it will work properly (of course)... But...
If you run your script from outside the GIT repository, it will not work properly.
e.g.
This PR, fix this behaviour.