Title: version_files not working · commitizen-tools/commitizen · Discussion #1382 · GitHub
Open Graph Title: version_files not working · commitizen-tools/commitizen · Discussion #1382
X Title: version_files not working · commitizen-tools/commitizen · Discussion #1382
Description: version_files not working
Open Graph Description: Description I'm using commitizen in a expo + react-native project I do cz init and make a .cz.json like this { "commitizen": { "name": "cz_conventional_commits", "tag_format": "test-$version", "ver...
X Description: Description I'm using commitizen in a expo + react-native project I do cz init and make a .cz.json like this { "commitizen": { "name": "cz_conventional_commits", &...
Opengraph URL: https://github.com/commitizen-tools/commitizen/discussions/1382
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"version_files not working","text":"Description
\nI'm using commitizen in a expo + react-native project
\nI do cz init and make a .cz.json like this
\n{\n \"commitizen\": {\n \"name\": \"cz_conventional_commits\",\n \"tag_format\": \"test-$version\",\n \"version_scheme\": \"semver\",\n \"version\": \"3.2.4\",\n \"update_changelog_on_bump\": true,\n \"version_files\": [\n \"package.json:version\",\n \"app.json:expo.version\"\n ]\n }\n}\nbtw I select commitizen(default) not npm in source of the version
\nthen I do cz commit and cz bump
\neverything finish
\nversion in .cz.json did update
\nbut version in package.json and app.json not update
\nI'm not sure is it a bug or not,
\nmaybe is something I missed in configuration?
\nor is a syntax error?
\nSteps to reproduce
\n\n- run
cz init. \n- select\n
\n.cz.json \ncz_conventional_commits(default) \ncommitizen(default) \nY (latest tag) \nsemver \nn (correct tag format) \ntest-$version \nY (auto changelog) \nenter (with no hooks) \n
\n \n- manually setting
version_files in .cz.json \n- create new commit
\n- run
cz bump \n
\nCurrent behavior
\nafter I setting package.json:version and app.json:expo.version
\nI think these 2 files will update the correct version
\nsame as the version in .cz.json
\nbut not
\nDesired behavior
\nI want these 3 files update with same and correct version
\n\n- package.json (version)
\n- app.json (expo.version)
\n- .cz.json (version)
\n
\nScreenshots
\nNo response
\nEnvironment
\nCommitizen Version: 4.4.1
\nPython Version: 3.13.2 (main, Feb 4 2025, 14:51:09) [Clang 16.0.0 (clang-1600.0.26.6)]
\nOperating System: Darwin
","upvoteCount":1,"answerCount":4,"acceptedAnswer":{"@type":"Answer","text":"\nnow my question is how to set the correct version property in version_files if version is in a nesting object.
\n
\nI think you'll need to implement a customized version_provider. Unfortunatly, we don't have a smart enough way to specify complicated conditions in version_files, but we welcome feature proposals 🙂
","upvoteCount":0,"url":"https://github.com/commitizen-tools/commitizen/discussions/1382#discussioncomment-12738043"}}}
| 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:3247b0c3-58bd-267c-1115-2d45bac454b5 |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | BC32:243FA0:AD186A3:DFAD088:697662B5 |
| html-safe-nonce | 28561d8e73d5caf5f031fdd65ddbc298bf1f425c8d7ce237ef76343a98068580 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzMyOjI0M0ZBMDpBRDE4NkEzOkRGQUQwODg6Njk3NjYyQjUiLCJ2aXNpdG9yX2lkIjoiMjM0NTEwMDkxMDQ0NDA0NDk4MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d1b67febbe19ac32844812b3afde50395ad47f0d2ea619177a94072fa339c832 |
| hovercard-subject-tag | discussion:8170760 |
| 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/1382/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/4bba8ca55b211ee7a45528006a1fa113ccce6ef51dcd0bdddba2f1d0c6c40034/commitizen-tools/commitizen/discussions/1382 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4bba8ca55b211ee7a45528006a1fa113ccce6ef51dcd0bdddba2f1d0c6c40034/commitizen-tools/commitizen/discussions/1382 |
| og:image:alt | Description I'm using commitizen in a expo + react-native project I do cz init and make a .cz.json like this { "commitizen": { "name": "cz_conventional_commits", "tag_format": "test-$version", "ver... |
| 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 | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width