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
from the documentation, it seems that paths in version_files can be either
relative to execution path
absolute path
glob patterns
I might be missing something, but IMHO a sensible option would be to also specify files relatively to the commitizen configuration file's path. For example:
# /home/myself/project/cz.toml
[tool.commitizen]
version_files = [
"src/__version__.py", # relative to execution path: won't update if we call `cz bump` from the project `src` dir
"$CZCONFIG/src/__version__.py", # relative to where the cz config file is, will always update the file
]
In this case, $CZCONFIG would make that path relative to /home/myself/project/.
Is something like this currently possible?
EDIT: clearly I'm avoiding absolute paths so that configurations can be shared among multiple workstation/people/locations/etc.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
from the documentation, it seems that paths in
version_files
can be eitherI might be missing something, but IMHO a sensible option would be to also specify files relatively to the commitizen configuration file's path. For example:
In this case,
$CZCONFIG
would make that path relative to/home/myself/project/
.Is something like this currently possible?
EDIT: clearly I'm avoiding absolute paths so that configurations can be shared among multiple workstation/people/locations/etc.
Beta Was this translation helpful? Give feedback.
All reactions