You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(branch formatter is there to sanitize branch name to something valid for a version)
Now, if we do clone with depth=1, we get an invalid versions like 2024.1.0devNone because it couldn't find either a tag distance or a commit distance. It would be great if, when no distance was found it simply returned the contents of the VERSION file (or 2024.1.0dev0. Basically, I want it always to be something valid no matter how they've fetched the project. Is this something that needs a custom version callback?
The project in question has over 900 forks so if it doesn't "just work" in all common cases then contributors are going to hit annoying barriers.
I think my current workaround is going to be to leave setuptools-git-versioning out of the main repo (for safety/compatibility) and just install it in the CI build system, when generating our official releases. But if I could set it up to work safely in all places that would feel neater.
The text was updated successfully, but these errors were encountered:
In my project we're setting project/VERSION and reading that in as the basis for file-based versioning using
(branch formatter is there to sanitize branch name to something valid for a version)
Now, if we do clone with depth=1, we get an invalid versions like
2024.1.0devNone
because it couldn't find either a tag distance or a commit distance. It would be great if, when no distance was found it simply returned the contents of the VERSION file (or2024.1.0dev0
. Basically, I want it always to be something valid no matter how they've fetched the project. Is this something that needs a custom version callback?The project in question has over 900 forks so if it doesn't "just work" in all common cases then contributors are going to hit annoying barriers.
I think my current workaround is going to be to leave
setuptools-git-versioning
out of the main repo (for safety/compatibility) and just install it in the CI build system, when generating our official releases. But if I could set it up to work safely in all places that would feel neater.The text was updated successfully, but these errors were encountered: