|
579 | 579 | <ul class="md-nav__list"> |
580 | 580 |
|
581 | 581 | <li class="md-nav__item"> |
582 | | - <a href="#-files-only" class="md-nav__link"> |
| 582 | + <a href="#-version-files-only" class="md-nav__link"> |
583 | 583 | <span class="md-ellipsis"> |
584 | 584 |
|
585 | | - --files-only |
| 585 | + --version-files-only |
586 | 586 |
|
587 | 587 | </span> |
588 | 588 | </a> |
|
2503 | 2503 | <ul class="md-nav__list"> |
2504 | 2504 |
|
2505 | 2505 | <li class="md-nav__item"> |
2506 | | - <a href="#-files-only" class="md-nav__link"> |
| 2506 | + <a href="#-version-files-only" class="md-nav__link"> |
2507 | 2507 | <span class="md-ellipsis"> |
2508 | 2508 |
|
2509 | | - --files-only |
| 2509 | + --version-files-only |
2510 | 2510 |
|
2511 | 2511 | </span> |
2512 | 2512 | </a> |
@@ -2888,6 +2888,18 @@ <h3 id="-version-scheme"><code>--version-scheme</code><a class="headerlink" href |
2888 | 2888 | </tbody> |
2889 | 2889 | </table> |
2890 | 2890 | </div> |
| 2891 | +<div class="admonition note"> |
| 2892 | +<p class="admonition-title">Incomplete Version Handling</p> |
| 2893 | +<p>Commitizen treats a three-part version (major.minor.patch) as complete. |
| 2894 | +If your configured version is incomplete (for example, <code>1</code> or <code>1.2</code>), Commitizen pads missing parts with zeros when it needs <code>major/minor/patch</code> for tag formatting. |
| 2895 | +The tag output depends on your <code>tag_format</code>: formats using <code>${version}</code> keep <code>1</code>/<code>1.2</code>, while formats using <code>${major}.${minor}.${patch}</code> will render <code>1.0.0</code>/<code>1.2.0</code>.</p> |
| 2896 | +<p>When bumping from an incomplete version, Commitizen looks for the latest existing tag that matches the provided release prefix. |
| 2897 | +For example, if the current version is <code>1.2</code> and the latest <code>1.2.x</code> tag is <code>1.2.3</code>, then a patch bump yields <code>1.2.4</code> and a minor bump yields <code>1.3.0</code>.</p> |
| 2898 | +</div> |
| 2899 | +<div class="admonition tip"> |
| 2900 | +<p class="admonition-title">Tip</p> |
| 2901 | +<p>To control the behaviour of bumping and version parsing, you may implement your own <code>version_scheme</code> by inheriting from <code>commitizen.version_schemes.BaseVersion</code> or use an existing plugin package.</p> |
| 2902 | +</div> |
2891 | 2903 | <h3 id="pep440-version-examples">PEP440 Version Examples<a class="headerlink" href="#pep440-version-examples" title="Permanent link">¶</a></h3> |
2892 | 2904 | <p>Commitizen supports the <a href="https://www.python.org/dev/peps/pep-0440/">PEP 440</a> version format, which includes several version types. Here are examples of each:</p> |
2893 | 2905 | <h4 id="standard-releases">Standard Releases<a class="headerlink" href="#standard-releases" title="Permanent link">¶</a></h4> |
@@ -2921,9 +2933,9 @@ <h4 id="combined-pre-release-and-development">Combined Pre-release and Developme |
2921 | 2933 | </blockquote> |
2922 | 2934 | <h2 id="command-line-options">Command line options<a class="headerlink" href="#command-line-options" title="Permanent link">¶</a></h2> |
2923 | 2935 | <p><img alt="cz bump --help" src="../../images/cli_help/cz_bump___help.svg" /></p> |
2924 | | -<h3 id="-files-only"><code>--files-only</code><a class="headerlink" href="#-files-only" title="Permanent link">¶</a></h3> |
| 2936 | +<h3 id="-version-files-only"><code>--version-files-only</code><a class="headerlink" href="#-version-files-only" title="Permanent link">¶</a></h3> |
2925 | 2937 | <p>Bumps the version in the files defined in <a href="../../config/bump/#version_files"><code>version_files</code></a> without creating a commit and tag on the git repository.</p> |
2926 | | -<div class="highlight"><pre><span></span><code>cz<span class="w"> </span>bump<span class="w"> </span>--files-only |
| 2938 | +<div class="highlight"><pre><span></span><code>cz<span class="w"> </span>bump<span class="w"> </span>--version-files-only |
2927 | 2939 | </code></pre></div> |
2928 | 2940 | <h3 id="-changelog"><code>--changelog</code><a class="headerlink" href="#-changelog" title="Permanent link">¶</a></h3> |
2929 | 2941 | <p>Generate a <strong>changelog</strong> along with the new version and tag when bumping. See <a href="../changelog/">changelog</a> for more details.</p> |
@@ -3303,7 +3315,7 @@ <h3 id="-yes"><code>--yes</code><a class="headerlink" href="#-yes" title="Perman |
3303 | 3315 | <span class="md-icon" title="Last update"> |
3304 | 3316 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg> |
3305 | 3317 | </span> |
3306 | | - <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date" title="January 5, 2026 12:23:24 UTC">January 5, 2026</span> |
| 3318 | + <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date" title="February 1, 2026 10:53:42 UTC">February 1, 2026</span> |
3307 | 3319 | </span> |
3308 | 3320 |
|
3309 | 3321 |
|
|
0 commit comments