-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve documentation on hooks flow - specifically when and how the dynamic version is written to a file #212
Comments
The dynamic version, and the whole backend, only take effect when And the hook will be triggered whenever a You can even trigger the build hook with other build frontends, such as build, in this case |
Yeah it would be great to see an explanation of how the tag is generated. I could pick out the commit hash and the current date but there seemed to be large differences depending on whether my working directory was dirty and I couldn't figure out whether the branch name had an impact. Thanks! |
pdm-backend/src/pdm/backend/hooks/version/scm.py Lines 312 to 327 in 4f20cfd
|
Hi.
I'm trying to wrap my head around pdm, pdm-backend and, more generally, how the hooks works and how are they actually connected.
At the moment my goal is to understand how I can leverage pdm to create a python file with the scm version. I have looked at Writing dynamic version to file and at Lifecycle and Hooks but I have some questions:
dynamic = ["version"]
,source = "scm"
, andwrite_to = "foo/_version.py"
in the appropriatepyproject.toml
tables. What cli command(s) will trigger the creation of the file? is there an explicit way?distribution = false
(because I'm writing a application that is meant to be used internally and deployed via dockerfile where I just copy the sources) - is this choice relevant?pdm-backend
asbuild-backend
? or is it apdm
feature that may work withsetuptools
or any other backend?tag_regex
)? I haven't see any log/warning/error during my testspdm-backend/src/pdm/backend/hooks/version/__init__.py
Lines 88 to 94 in 940d129
hooks.version
module, but I haven't found any reference to it in the docs. Is that related to the pdm hooks?I'm having these doubts because I have a project that I've recently migrated to pdm, and I'm new to it, and I want to be sure to understand how it works
The text was updated successfully, but these errors were encountered: