mtkennerly / poetry-dynamic-versioning

Plugin for Poetry to enable dynamic versioning based on VCS tags
MIT License
588 stars 36 forks source link

Push to PyPI, even in dirty mode #171

Closed wabiloo closed 3 months ago

wabiloo commented 3 months ago

Hi,

I have a question related to https://github.com/mtkennerly/poetry-dynamic-versioning/issues/141.

I understand that if I create a git tag and then build and publish, then the version will be in the "right" format for PyPI to accept it (eg. "v0.1.2"). However this does not work is I'm in a dirty state. Which is often the case (various files that have not been added to git yet, because they're experiments that are not yet worth adding).

Is there a way to have the dirty flag "removed" when doing publish (but I still want it when I just do a local build)?

mtkennerly commented 3 months ago

Hi! Would it be enough to just do git stash && poetry publish --build && git stash pop? Or if they're long-term untracked files, then perhaps you could group them together in a .gitignored folder?

wabiloo commented 3 months ago

That's actually what I ended up doing. Thanks!