ofek / hatch-vcs

Hatch plugin for versioning with your preferred VCS
MIT License
99 stars 15 forks source link

Version when .git root folder n levels up #70

Open infn-ke opened 3 weeks ago

infn-ke commented 3 weeks ago

How can I use the plugin to get the version when the .git folder is n levels up?

ethnB commented 3 weeks ago

@infn-ke

I've been using this configuration:

[tool.hatch.version]
source = "vcs"

[tool.hatch.version.raw-options]
root = "../"

to use a git repo one level above my package. Hope that answers your question.

infn-ke commented 3 weeks ago

Thanks @ethnB that worked!