Skip to content

Commit 4ab7b74

Browse files
deploy: d7e01aa
1 parent be38355 commit 4ab7b74

File tree

4 files changed

+215
-174
lines changed

4 files changed

+215
-174
lines changed

commands/bump/index.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,15 @@
590590
</span>
591591
</a>
592592

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+
593602
</li>
594603

595604
</ul>
@@ -1439,6 +1448,15 @@
14391448
</span>
14401449
</a>
14411450

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+
14421460
</li>
14431461

14441462
</ul>
@@ -1907,6 +1925,25 @@ <h3 id="-build-metadata"><code>--build-metadata</code><a class="headerlink" href
19071925
<p>You should normally not use this functionality, but if you decide to do, keep in mind that
19081926
* 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.
19091927
* 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">&para;</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>
19101947
<h2 id="avoid-raising-errors">Avoid raising errors<a class="headerlink" href="#avoid-raising-errors" title="Permanent link">&para;</a></h2>
19111948
<p>Some situations from commitizen raise an exit code different than 0.
19121949
If the error code is different than 0, any CI or script running commitizen might be interrupted.</p>

0 commit comments

Comments
 (0)