Title: version_files relative to configuration file? · commitizen-tools/commitizen · Discussion #1320 · GitHub
Open Graph Title: version_files relative to configuration file? · commitizen-tools/commitizen · Discussion #1320
X Title: version_files relative to configuration file? · commitizen-tools/commitizen · Discussion #1320
Description: version_files relative to configuration file?
Open Graph Description: Hello, 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 wou...
X Description: Hello, 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 wou...
Opengraph URL: https://github.com/commitizen-tools/commitizen/discussions/1320
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"version_files relative to configuration file?","text":"Hello,
\nfrom the documentation, it seems that paths in version_files can be either
\n\n- relative to execution path
\n- absolute path
\n- glob patterns
\n
\nI 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:
\n# /home/myself/project/cz.toml\n[tool.commitizen]\nversion_files = [\n \"src/__version__.py\", # relative to execution path: won't update if we call `cz bump` from the project `src` dir\n \"$CZCONFIG/src/__version__.py\", # relative to where the cz config file is, will always update the file\n]\n
\nIn this case, $CZCONFIG would make that path relative to /home/myself/project/.
\nIs something like this currently possible?
\nEDIT: clearly I'm avoiding absolute paths so that configurations can be shared among multiple workstation/people/locations/etc.
","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"I think it's (or should be) based on config file 🤔 If not, it sounds like a bug to me. but I'll need to test it out
","upvoteCount":2,"url":"https://github.com/commitizen-tools/commitizen/discussions/1320#discussioncomment-12564897"}}}
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:05ff6c1a-8772-74fb-497b-1e957d33d033 |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | A106:291F67:8FF2CA:B7B02A:6976BD0D |
| html-safe-nonce | 2a584ed6c17776b1c1959abe6ded07c6159a6ce02e9724a85b436739bc42c218 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMTA2OjI5MUY2Nzo4RkYyQ0E6QjdCMDJBOjY5NzZCRDBEIiwidmlzaXRvcl9pZCI6IjI0MzU5NjU1MDQ4NDYyMTY0NjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 71da8266961b7389c40d7bcaf51e2793a939d70f66cc4fd0f14a94b6e90ae5f2 |
| hovercard-subject-tag | discussion:7754772 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/commitizen-tools/commitizen/1320/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/a24bd9de2938c18c407cb190ffa56db34f5db99d86ba9e6d550a07656bfa0e7e/commitizen-tools/commitizen/discussions/1320 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a24bd9de2938c18c407cb190ffa56db34f5db99d86ba9e6d550a07656bfa0e7e/commitizen-tools/commitizen/discussions/1320 |
| og:image:alt | Hello, 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 wou... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 032152924a283b83384255d9489e7b93b54ba01da8d380b05ecd3953b3212411 |
| turbo-cache-control | no-preview |
| go-import | github.com/commitizen-tools/commitizen git https://github.com/commitizen-tools/commitizen.git |
| octolytics-dimension-user_id | 62252524 |
| octolytics-dimension-user_login | commitizen-tools |
| octolytics-dimension-repository_id | 106127589 |
| octolytics-dimension-repository_nwo | commitizen-tools/commitizen |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 106127589 |
| octolytics-dimension-repository_network_root_nwo | commitizen-tools/commitizen |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5b577f6be6482e336e3c30e8daefa30144947b17 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width