Skip to content

Commit f28adea

Browse files
committed
Deploying to gh-pages from @ 3cb9b2c 🚀
1 parent 8368d8c commit f28adea

File tree

4 files changed

+457
-235
lines changed

4 files changed

+457
-235
lines changed

commands/bump/index.html

Lines changed: 8 additions & 189 deletions
Original file line numberDiff line numberDiff line change
@@ -821,23 +821,6 @@
821821

822822
</li>
823823

824-
</ul>
825-
</nav>
826-
827-
</li>
828-
829-
<li class="md-nav__item">
830-
<a href="#bump-version-to-200-even-when-theres-no-breaking-changes-or-even-no-commits" class="md-nav__link">
831-
<span class="md-ellipsis">
832-
833-
bump version to 2.0.0 even when there's no breaking changes or even no commits
834-
835-
</span>
836-
</a>
837-
838-
<nav class="md-nav" aria-label="bump version to 2.0.0 even when there&#39;s no breaking changes or even no commits">
839-
<ul class="md-nav__list">
840-
841824
<li class="md-nav__item">
842825
<a href="#-tag-format" class="md-nav__link">
843826
<span class="md-ellipsis">
@@ -847,56 +830,6 @@
847830
</span>
848831
</a>
849832

850-
</li>
851-
852-
<li class="md-nav__item">
853-
<a href="#avoid-raising-errors" class="md-nav__link">
854-
<span class="md-ellipsis">
855-
856-
Avoid raising errors
857-
858-
</span>
859-
</a>
860-
861-
<nav class="md-nav" aria-label="Avoid raising errors">
862-
<ul class="md-nav__list">
863-
864-
<li class="md-nav__item">
865-
<a href="#recommended-use-case" class="md-nav__link">
866-
<span class="md-ellipsis">
867-
868-
Recommended use case
869-
870-
</span>
871-
</a>
872-
873-
</li>
874-
875-
<li class="md-nav__item">
876-
<a href="#easy-way" class="md-nav__link">
877-
<span class="md-ellipsis">
878-
879-
Easy way
880-
881-
</span>
882-
</a>
883-
884-
</li>
885-
886-
<li class="md-nav__item">
887-
<a href="#longer-way" class="md-nav__link">
888-
<span class="md-ellipsis">
889-
890-
Longer way
891-
892-
</span>
893-
</a>
894-
895-
</li>
896-
897-
</ul>
898-
</nav>
899-
900833
</li>
901834

902835
</ul>
@@ -2690,23 +2623,6 @@
26902623

26912624
</li>
26922625

2693-
</ul>
2694-
</nav>
2695-
2696-
</li>
2697-
2698-
<li class="md-nav__item">
2699-
<a href="#bump-version-to-200-even-when-theres-no-breaking-changes-or-even-no-commits" class="md-nav__link">
2700-
<span class="md-ellipsis">
2701-
2702-
bump version to 2.0.0 even when there's no breaking changes or even no commits
2703-
2704-
</span>
2705-
</a>
2706-
2707-
<nav class="md-nav" aria-label="bump version to 2.0.0 even when there&#39;s no breaking changes or even no commits">
2708-
<ul class="md-nav__list">
2709-
27102626
<li class="md-nav__item">
27112627
<a href="#-tag-format" class="md-nav__link">
27122628
<span class="md-ellipsis">
@@ -2716,56 +2632,6 @@
27162632
</span>
27172633
</a>
27182634

2719-
</li>
2720-
2721-
<li class="md-nav__item">
2722-
<a href="#avoid-raising-errors" class="md-nav__link">
2723-
<span class="md-ellipsis">
2724-
2725-
Avoid raising errors
2726-
2727-
</span>
2728-
</a>
2729-
2730-
<nav class="md-nav" aria-label="Avoid raising errors">
2731-
<ul class="md-nav__list">
2732-
2733-
<li class="md-nav__item">
2734-
<a href="#recommended-use-case" class="md-nav__link">
2735-
<span class="md-ellipsis">
2736-
2737-
Recommended use case
2738-
2739-
</span>
2740-
</a>
2741-
2742-
</li>
2743-
2744-
<li class="md-nav__item">
2745-
<a href="#easy-way" class="md-nav__link">
2746-
<span class="md-ellipsis">
2747-
2748-
Easy way
2749-
2750-
</span>
2751-
</a>
2752-
2753-
</li>
2754-
2755-
<li class="md-nav__item">
2756-
<a href="#longer-way" class="md-nav__link">
2757-
<span class="md-ellipsis">
2758-
2759-
Longer way
2760-
2761-
</span>
2762-
</a>
2763-
2764-
</li>
2765-
2766-
</ul>
2767-
</nav>
2768-
27692635
</li>
27702636

27712637
</ul>
@@ -2790,6 +2656,8 @@
27902656

27912657

27922658

2659+
<h1>bump</h1>
2660+
27932661
<p><img alt="Bump version" src="../../images/bump.gif" /></p>
27942662
<h2 id="about">About<a class="headerlink" href="#about" title="Permanent link">&para;</a></h2>
27952663
<p><code>cz bump</code> is a powerful command that <strong>automatically</strong> determines and increases your project's version number based on your commit history.</p>
@@ -3205,30 +3073,27 @@ <h3 id="-get-next"><code>--get-next</code><a class="headerlink" href="#-get-next
32053073
<div class="admonition warning">
32063074
<p class="admonition-title">Warning</p>
32073075
<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>
3208-
<p>For information on how to suppress this exit, see <a href="#avoid-raising-errors">avoid raising errors</a>.</p>
3076+
<p>For information on how to suppress this exit, see <a href="../../exit_codes/#ignoring-exit-codes">Ignoring Exit Codes</a>.</p>
32093077
</div>
32103078
<h3 id="-allow-no-commit"><code>--allow-no-commit</code><a class="headerlink" href="#-allow-no-commit" title="Permanent link">&para;</a></h3>
32113079
<p>Allow the project version to be bumped even when there's no eligible version.</p>
3212-
<div class="admonition note">
3213-
<p class="admonition-title">Example usage</p>
3214-
<div class="highlight"><pre><span></span><code><span class="c1"># bump a minor version even when there&#39;s only bug fixes, documentation changes or even no commits</span>
3215-
3080+
<p>Example usage:</p>
3081+
<div class="highlight"><pre><span></span><code><span class="c1"># Force to bump a minor version</span>
32163082
cz<span class="w"> </span>bump<span class="w"> </span>--increment<span class="w"> </span>MINOR<span class="w"> </span>--allow-no-commit
32173083

32183084
<span class="c1"># bump version to 2.0.0 even when there&#39;s no breaking changes or even no commits</span>
32193085
cz<span class="w"> </span>bump<span class="w"> </span>--allow-no-commit<span class="w"> </span><span class="m">2</span>.0.0
32203086
</code></pre></div>
3221-
</div>
32223087
<div class="admonition note">
32233088
<p class="admonition-title">Default increment</p>
32243089
<p>The increment is overridden to <code>PATCH</code> if there is no increment detected or specified.</p>
32253090
<p>In other words, <code>cz bump --allow-no-commit</code> allows you to bump the version to the next patch version even when there is no eligible commit.</p>
32263091
<div class="highlight"><pre><span></span><code><span class="c1"># will bump to `1.0.1` if the current version is `1.0.0`.</span>
32273092
cz<span class="w"> </span>bump<span class="w"> </span>--allow-no-commit
3093+
3094+
<span class="c1"># bump version to 2.0.0 even when there&#39;s no breaking changes or even no commits</span>
3095+
cz<span class="w"> </span>bump<span class="w"> </span>--allow-no-commit<span class="w"> </span><span class="m">2</span>.0.0
32283096
</code></pre></div>
3229-
<h1 id="bump-version-to-200-even-when-theres-no-breaking-changes-or-even-no-commits">bump version to 2.0.0 even when there's no breaking changes or even no commits<a class="headerlink" href="#bump-version-to-200-even-when-theres-no-breaking-changes-or-even-no-commits" title="Permanent link">&para;</a></h1>
3230-
<p>cz bump --allow-no-commit 2.0.0
3231-
```</p>
32323097
</div>
32333098
<h3 id="-tag-format"><code>--tag-format</code><a class="headerlink" href="#-tag-format" title="Permanent link">&para;</a></h3>
32343099
<p><code>tag_format</code> and [version_scheme][version_scheme] are combined to make Git tag names from versions.</p>
@@ -3287,52 +3152,6 @@ <h3 id="-tag-format"><code>--tag-format</code><a class="headerlink" href="#-tag-
32873152
</tr>
32883153
</tbody>
32893154
</table>
3290-
<h2 id="avoid-raising-errors">Avoid raising errors<a class="headerlink" href="#avoid-raising-errors" title="Permanent link">&para;</a></h2>
3291-
<p>Some situations from Commitizen raise an exit code different from 0.
3292-
If the error code is different from 0, any CI or script running Commitizen might be interrupted.</p>
3293-
<p>If you have a special use case, where you don't want to raise one of these error codes, you can
3294-
tell Commitizen to not raise them.</p>
3295-
<h3 id="recommended-use-case">Recommended use case<a class="headerlink" href="#recommended-use-case" title="Permanent link">&para;</a></h3>
3296-
<p>At the moment, we've identified that the most common error code to skip is</p>
3297-
<table>
3298-
<thead>
3299-
<tr>
3300-
<th>Error name</th>
3301-
<th>Exit code</th>
3302-
</tr>
3303-
</thead>
3304-
<tbody>
3305-
<tr>
3306-
<td>NoneIncrementExit</td>
3307-
<td>21</td>
3308-
</tr>
3309-
</tbody>
3310-
</table>
3311-
<p>There are some situations where you don't want to get an error code when some
3312-
commits do not match your rules, you just want those commits to be skipped.</p>
3313-
<div class="highlight"><pre><span></span><code>cz<span class="w"> </span>-nr<span class="w"> </span><span class="m">21</span><span class="w"> </span>bump
3314-
</code></pre></div>
3315-
<h3 id="easy-way">Easy way<a class="headerlink" href="#easy-way" title="Permanent link">&para;</a></h3>
3316-
<p>Check which error code was raised by Commitizen by running in the terminal</p>
3317-
<div class="highlight"><pre><span></span><code><span class="nb">echo</span><span class="w"> </span><span class="nv">$?</span>
3318-
</code></pre></div>
3319-
<p>The output should be an integer like this</p>
3320-
<div class="highlight"><pre><span></span><code><span class="m">3</span>
3321-
</code></pre></div>
3322-
<p>And then you can tell Commitizen to ignore it:</p>
3323-
<div class="highlight"><pre><span></span><code>cz<span class="w"> </span>--no-raise<span class="w"> </span><span class="m">3</span>
3324-
</code></pre></div>
3325-
<p>You can tell Commitizen to skip more than one if needed:</p>
3326-
<div class="highlight"><pre><span></span><code>cz<span class="w"> </span>--no-raise<span class="w"> </span><span class="m">3</span>,4,5
3327-
</code></pre></div>
3328-
<h3 id="longer-way">Longer way<a class="headerlink" href="#longer-way" title="Permanent link">&para;</a></h3>
3329-
<p>Check the list of <a href="../../exit_codes/">exit_codes</a> and understand which one you have
3330-
to skip and why.</p>
3331-
<p>Remember to document somewhere this, because you'll forget.</p>
3332-
<p>For example if the system raises a <code>NoneIncrementExit</code> error, you look it up
3333-
on the list, and then you can use the exit code:</p>
3334-
<div class="highlight"><pre><span></span><code>cz<span class="w"> </span>-nr<span class="w"> </span><span class="m">21</span><span class="w"> </span>bump
3335-
</code></pre></div>
33363155

33373156

33383157

0 commit comments

Comments
 (0)