Title: Tag not set correctly using devreleases with semver2 and custom tag_format · Issue #1615 · commitizen-tools/commitizen · GitHub
Open Graph Title: Tag not set correctly using devreleases with semver2 and custom tag_format · Issue #1615 · commitizen-tools/commitizen
X Title: Tag not set correctly using devreleases with semver2 and custom tag_format · Issue #1615 · commitizen-tools/commitizen
Description: Description When using a custom tag format like ${major}.${minor}-${patch}${devrelease} with semver2 the created tags miss the devrelease part. Further devreleases fail due to duplicate tags. Steps to reproduce Initialize git project and...
Open Graph Description: Description When using a custom tag format like ${major}.${minor}-${patch}${devrelease} with semver2 the created tags miss the devrelease part. Further devreleases fail due to duplicate tags. Steps...
X Description: Description When using a custom tag format like ${major}.${minor}-${patch}${devrelease} with semver2 the created tags miss the devrelease part. Further devreleases fail due to duplicate tags. Steps...
Opengraph URL: https://github.com/commitizen-tools/commitizen/issues/1615
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Tag not set correctly using devreleases with semver2 and custom tag_format","articleBody":"### Description\n\nWhen using a custom tag format like `${major}.${minor}-${patch}${devrelease}` with `semver2` the created tags miss the `devrelease` part. Further devreleases fail due to duplicate tags.\n\n### Steps to reproduce\n\n1. Initialize git project and place cz configuration:\n```\ngit init .\ncat \u003c\u003c EOF | tee cz.toml\n[tool.commitizen]\nname = \"cz_conventional_commits\"\ntag_format = \"\\${major}.\\${minor}-\\${patch}\\${devrelease}\"\nversion_scheme = \"semver2\"\nversion = \"0.0.1\"\nupdate_changelog_on_bump = true\nEOF\n```\n2. Create a first commit\n```\necho \"# test\" | tee README.md\ngit add README.md cz.toml\ngit commit -m \"fix: Add readme file\"\n```\n3. Bump a devrelease\n```\ncz bump --devrelease 1 --yes\n```\n4. Observe incorrect \"tag to create\" in output tag (note **${devrelease}**)\n```\nbump: version 0.0.1 → 0.0.2-dev.1\ntag to create: 0.0-2${devrelease}\nincrement detected: PATCH\n```\n5. Observe inccorect git tag\n```\ngit tag -l\n```\n6. Trying to add more changes and bump the next devrelease will fail\n\n### Current behavior\n\nNo `devrelease` part is added according to the configuration. The tag equals `${major}.${minor}-${patch}` which produces further errors using a next devrelease.\n\n### Desired behavior\n\nThe tag shall be set correctly according to custom tag_format and semver2 convention like `0.0-2dev1`\n\n### Screenshots\n\nn/a\n\n### Environment\n\nCommitizen Version: 4.9.1\nPython Version: 3.9.21 (main, Aug 19 2025, 00:00:00) \n[GCC 11.5.0 20240719 (Red Hat 11.5.0-5)]\nOperating System: Linux\n","author":{"url":"https://github.com/pydal","@type":"Person","name":"pydal"},"datePublished":"2025-09-18T09:44:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/1615/commitizen/issues/1615"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cb714909-0906-1c5f-a0ae-808ec2a68d82 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B886:13A7CE:13CD0BE:1B64179:6A4DE7CD |
| html-safe-nonce | 99fee3b6c69aaea3a26b9add195604f455633416c1d5a2545fee1193f281600a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODg2OjEzQTdDRToxM0NEMEJFOjFCNjQxNzk6NkE0REU3Q0QiLCJ2aXNpdG9yX2lkIjoiODc4OTA3NTM5OTYxNzE0NDc4MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 371a8991d1c70605bfb1773712723aaae8dd5e5875cd09fc95458bb5156c41a3 |
| hovercard-subject-tag | issue:3429543054 |
| github-keyboard-shortcuts | repository,issues,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/issues/show/commitizen-tools/commitizen/1615/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e762430ee99ae44091ea0355e1a10f3fb36f05669548465b7e24c76085945da7/commitizen-tools/commitizen/issues/1615 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e762430ee99ae44091ea0355e1a10f3fb36f05669548465b7e24c76085945da7/commitizen-tools/commitizen/issues/1615 |
| og:image:alt | Description When using a custom tag format like ${major}.${minor}-${patch}${devrelease} with semver2 the created tags miss the devrelease part. Further devreleases fail due to duplicate tags. Steps... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pydal |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| 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 | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width