|
590 | 590 | </span>
|
591 | 591 | </a>
|
592 | 592 |
|
| 593 | +</li> |
| 594 | + |
| 595 | + <li class="md-nav__item"> |
| 596 | + <a href="#-get-next" class="md-nav__link"> |
| 597 | + <span class="md-ellipsis"> |
| 598 | + --get-next |
| 599 | + </span> |
| 600 | + </a> |
| 601 | + |
593 | 602 | </li>
|
594 | 603 |
|
595 | 604 | </ul>
|
|
1439 | 1448 | </span>
|
1440 | 1449 | </a>
|
1441 | 1450 |
|
| 1451 | +</li> |
| 1452 | + |
| 1453 | + <li class="md-nav__item"> |
| 1454 | + <a href="#-get-next" class="md-nav__link"> |
| 1455 | + <span class="md-ellipsis"> |
| 1456 | + --get-next |
| 1457 | + </span> |
| 1458 | + </a> |
| 1459 | + |
1442 | 1460 | </li>
|
1443 | 1461 |
|
1444 | 1462 | </ul>
|
@@ -1907,6 +1925,25 @@ <h3 id="-build-metadata"><code>--build-metadata</code><a class="headerlink" href
|
1907 | 1925 | <p>You should normally not use this functionality, but if you decide to do, keep in mind that
|
1908 | 1926 | * Version <code>1.2.3+a</code>, and <code>1.2.3+b</code> are the same version! Tools should not use the string after <code>+</code> for version calculation. This is probably not a guarantee (example in helm) even tho it is in the spec.
|
1909 | 1927 | * It might be problematic having the metadata in place when doing upgrades depending on what tool you use.</p>
|
| 1928 | +<h3 id="-get-next"><code>--get-next</code><a class="headerlink" href="#-get-next" title="Permanent link">¶</a></h3> |
| 1929 | +<p>Provides a way to determine the next version and write it to stdout. This parameter is not compatible with <code>--changelog</code> |
| 1930 | +and <code>manual version</code>.</p> |
| 1931 | +<div class="highlight"><pre><span></span><code>cz<span class="w"> </span>bump<span class="w"> </span>--get-next |
| 1932 | +</code></pre></div> |
| 1933 | +<p>Will output the next version, e.g., <code>1.2.3</code>. This can be useful for determining the next version based on CI for non |
| 1934 | +production environments/builds.</p> |
| 1935 | +<p>This behavior differs from the <code>--dry-run</code> flag. The <code>--dry-run</code> flag provides a more detailed output and can also show |
| 1936 | +the changes as they would appear in the changelog file.</p> |
| 1937 | +<p>The following output is the result of <code>cz bump --dry-run</code>:</p> |
| 1938 | +<div class="highlight"><pre><span></span><code>bump: version 3.28.0 → 3.29.0 |
| 1939 | +tag to create: v3.29.0 |
| 1940 | +increment detected: MINOR |
| 1941 | +</code></pre></div> |
| 1942 | +<p>The following output is the result of <code>cz bump --get-next</code>:</p> |
| 1943 | +<div class="highlight"><pre><span></span><code>3.29.0 |
| 1944 | +</code></pre></div> |
| 1945 | +<p>The <code>--get-next</code> flag will raise a <code>NoneIncrementExit</code> if the found commits are not eligible for a version bump.</p> |
| 1946 | +<p>For information on how to suppress this exit, see <a href="#avoid-raising-errors">avoid raising errors</a>.</p> |
1910 | 1947 | <h2 id="avoid-raising-errors">Avoid raising errors<a class="headerlink" href="#avoid-raising-errors" title="Permanent link">¶</a></h2>
|
1911 | 1948 | <p>Some situations from commitizen raise an exit code different than 0.
|
1912 | 1949 | If the error code is different than 0, any CI or script running commitizen might be interrupted.</p>
|
|
0 commit comments