Skip to content

Commit fa40711

Browse files
committed
Deploying to gh-pages from @ c92280f 🚀
1 parent 5c77c59 commit fa40711

File tree

2 files changed

+44
-53
lines changed

2 files changed

+44
-53
lines changed

commands/bump/index.html

Lines changed: 43 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -640,21 +640,6 @@
640640
</span>
641641
</a>
642642

643-
<nav class="md-nav" aria-label="--changelog-to-stdout">
644-
<ul class="md-nav__list">
645-
646-
<li class="md-nav__item">
647-
<a href="#useful-scenarios" class="md-nav__link">
648-
<span class="md-ellipsis">
649-
Useful scenarios
650-
</span>
651-
</a>
652-
653-
</li>
654-
655-
</ul>
656-
</nav>
657-
658643
</li>
659644

660645
<li class="md-nav__item">
@@ -1791,21 +1776,6 @@
17911776
</span>
17921777
</a>
17931778

1794-
<nav class="md-nav" aria-label="--changelog-to-stdout">
1795-
<ul class="md-nav__list">
1796-
1797-
<li class="md-nav__item">
1798-
<a href="#useful-scenarios" class="md-nav__link">
1799-
<span class="md-ellipsis">
1800-
Useful scenarios
1801-
</span>
1802-
</a>
1803-
1804-
</li>
1805-
1806-
</ul>
1807-
</nav>
1808-
18091779
</li>
18101780

18111781
<li class="md-nav__item">
@@ -2253,7 +2223,7 @@ <h4 id="combined-pre-release-and-development">Combined Pre-release and Developme
22532223
<h2 id="command-line-options">Command line options<a class="headerlink" href="#command-line-options" title="Permanent link">&para;</a></h2>
22542224
<p><img alt="cz bump --help" src="../../images/cli_help/cz_bump___help.svg" /></p>
22552225
<h3 id="-files-only"><code>--files-only</code><a class="headerlink" href="#-files-only" title="Permanent link">&para;</a></h3>
2256-
<p>Bumps the version in the files defined in <a href="#version_files"><code>version_files</code></a> without creating a commit and tag on the git repository,</p>
2226+
<p>Bumps the version in the files defined in <a href="#version_files"><code>version_files</code></a> without creating a commit and tag on the git repository.</p>
22572227
<div class="highlight"><pre><span></span><code>cz<span class="w"> </span>bump<span class="w"> </span>--files-only
22582228
</code></pre></div>
22592229
<h3 id="-changelog"><code>--changelog</code><a class="headerlink" href="#-changelog" title="Permanent link">&para;</a></h3>
@@ -2262,7 +2232,7 @@ <h3 id="-changelog"><code>--changelog</code><a class="headerlink" href="#-change
22622232
</code></pre></div>
22632233
<h3 id="-prerelease"><code>--prerelease</code><a class="headerlink" href="#-prerelease" title="Permanent link">&para;</a></h3>
22642234
<p>The bump is a pre-release bump, meaning that in addition to a possible version bump the new version receives a
2265-
pre-release segment compatible with the bumps version scheme, where the segment consist of a <em>phase</em> and a
2235+
pre-release segment compatible with the bump's version scheme, where the segment consists of a <em>phase</em> and a
22662236
non-negative number. Supported options for <code>--prerelease</code> are the following phase names <code>alpha</code>, <code>beta</code>, or
22672237
<code>rc</code> (release candidate). For more details, refer to the
22682238
<a href="https://packaging.python.org/en/latest/specifications/version-specifiers/#pre-releases">Python Packaging User Guide</a>.</p>
@@ -2420,20 +2390,23 @@ <h3 id="-changelog-to-stdout"><code>--changelog-to-stdout</code><a class="header
24202390
Any other messages generated by <code>cz bump</code> will be sent to <code>stderr</code>.</p>
24212391
<p>When this flag is used, <code>--changelog</code> is implied.
24222392
However, it is recommended to set <code>--changelog</code> (or the setting <code>update_changelog_on_bump</code>) explicitly when the option <code>--changelog-to-stdout</code> is used.</p>
2423-
<h4 id="useful-scenarios">Useful scenarios<a class="headerlink" href="#useful-scenarios" title="Permanent link">&para;</a></h4>
2424-
<p>This is useful to pipe the newly created changelog to another tool. For example, it can be sent to an auditing system, or to create a GitHub Release, etc.</p>
2393+
<div class="admonition note">
2394+
<p class="admonition-title">Useful scenarios</p>
2395+
<p>Pipe the newly created changelog to another tool.</p>
2396+
<p>The output can be redirected to an auditing system, or used to create a GitHub Release, etc.</p>
24252397
<div class="highlight"><pre><span></span><code>cz<span class="w"> </span>bump<span class="w"> </span>--changelog<span class="w"> </span>--changelog-to-stdout<span class="w"> </span>&gt;<span class="w"> </span>body.md
24262398
</code></pre></div>
2399+
</div>
24272400
<h3 id="-git-output-to-stderr"><code>--git-output-to-stderr</code><a class="headerlink" href="#-git-output-to-stderr" title="Permanent link">&para;</a></h3>
2428-
<p>If <code>--git-output-to-stderr</code> is used, git commands output is redirected to <code>stderr</code>.</p>
2429-
<p>Useful when used with <code>--changelog-to-stdout</code> and piping the output to a file,</p>
2401+
<p>Redirects git commands output to <code>stderr</code>.</p>
2402+
<p>Useful when used with <code>--changelog-to-stdout</code> and piping the output to a file.</p>
24302403
<p>For example, <code>git commit</code> output may pollute <code>stdout</code>, so it is recommended to use this flag when piping the output to a file.</p>
24312404
<h3 id="-retry"><code>--retry</code><a class="headerlink" href="#-retry" title="Permanent link">&para;</a></h3>
24322405
<p>If you use tools like <a href="https://pre-commit.com/">pre-commit</a>, you can add this flag.
24332406
It will retry the commit if it fails the first time.</p>
24342407
<p>Useful to combine with code formatters, like <a href="https://prettier.io/">Prettier</a>.</p>
24352408
<h3 id="-major-version-zero"><code>--major-version-zero</code><a class="headerlink" href="#-major-version-zero" title="Permanent link">&para;</a></h3>
2436-
<p>Breaking changes does not bump the major version number.</p>
2409+
<p>Breaking changes do not bump the major version number.</p>
24372410
<p>Say you have a project with the version <code>0.1.x</code> and you commit a breaking change like this:</p>
24382411
<div class="highlight"><pre><span></span><code>fix(magic)!: fully deprecate whatever
24392412
</code></pre></div>
@@ -2459,7 +2432,7 @@ <h3 id="-major-version-zero"><code>--major-version-zero</code><a class="headerli
24592432
</code></pre></div>
24602433
</div>
24612434
<h3 id="-gpg-sign"><code>--gpg-sign</code><a class="headerlink" href="#-gpg-sign" title="Permanent link">&para;</a></h3>
2462-
<p>Create gpg signed tags.</p>
2435+
<p>Creates gpg signed tags.</p>
24632436
<div class="highlight"><pre><span></span><code>cz<span class="w"> </span>bump<span class="w"> </span>--gpg-sign
24642437
</code></pre></div>
24652438
<h3 id="-template"><code>--template</code><a class="headerlink" href="#-template" title="Permanent link">&para;</a></h3>
@@ -2471,15 +2444,17 @@ <h3 id="-extra"><code>--extra</code><a class="headerlink" href="#-extra" title="
24712444
</code></pre></div>
24722445
<p>See <a href="../../customization/#customizing-the-changelog-template">the template customization section</a>.</p>
24732446
<h3 id="-build-metadata"><code>--build-metadata</code><a class="headerlink" href="#-build-metadata" title="Permanent link">&para;</a></h3>
2474-
<p>Provides a way to specify additional metadata in the version string. This parameter is not compatible with <code>--local-version</code> as it uses the same part of the version string.</p>
2475-
<div class="highlight"><pre><span></span><code>cz<span class="w"> </span>bump<span class="w"> </span>--build-metadata<span class="w"> </span>yourmetadata
2447+
<p>Specifies additional metadata in the version string.</p>
2448+
<div class="highlight"><pre><span></span><code><span class="c1"># creates a version like `1.1.2+yourmetadata`.</span>
2449+
cz<span class="w"> </span>bump<span class="w"> </span>--build-metadata<span class="w"> </span>yourmetadata
24762450
</code></pre></div>
2477-
<p>Will create a version like <code>1.1.2+yourmetadata</code>.</p>
2478-
<p>This can be useful for multiple things</p>
2451+
<div class="admonition note">
2452+
<p class="admonition-title">Example usage</p>
24792453
<ul>
24802454
<li>Git hash in version</li>
24812455
<li>Labeling the version with additional metadata.</li>
24822456
</ul>
2457+
</div>
24832458
<div class="admonition note">
24842459
<p class="admonition-title">Note</p>
24852460
<p>Commitizen ignores everything after <code>+</code> when it bumps the version.</p>
@@ -2493,12 +2468,16 @@ <h3 id="-build-metadata"><code>--build-metadata</code><a class="headerlink" href
24932468
<li>It might be problematic having the metadata in place when doing upgrades depending on what tool you use.</li>
24942469
</ul>
24952470
</div>
2471+
<div class="admonition warning">
2472+
<p class="admonition-title">Warning</p>
2473+
<p>This parameter is not compatible with <code>--local-version</code> as it uses the same part of the version string.</p>
2474+
</div>
24962475
<h3 id="-get-next"><code>--get-next</code><a class="headerlink" href="#-get-next" title="Permanent link">&para;</a></h3>
2497-
<p>Provides a way to determine the next version and write it to stdout. This parameter is not compatible with <code>--changelog</code>
2498-
and <code>manual version</code>.</p>
2499-
<div class="highlight"><pre><span></span><code>cz<span class="w"> </span>bump<span class="w"> </span>--get-next
2476+
<p>Similar to <code>--dry-run</code> but only outputs the next version.</p>
2477+
<div class="highlight"><pre><span></span><code><span class="c1"># outputs 1.0.1 if the current version is 1.0.0 and the increment is PATCH</span>
2478+
cz<span class="w"> </span>bump<span class="w"> </span>--get-next
25002479
</code></pre></div>
2501-
<p>Will only 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-production environments/builds.</p>
2480+
<p>Useful for determining the next version based on CI for non-production environments/builds.</p>
25022481
<div class="admonition note">
25032482
<p class="admonition-title">Compare with <code>--dry-run</code></p>
25042483
<p><code>--dry-run</code> provides a more detailed output including the changes as they would appear in the changelog file, while <code>--get-next</code> only outputs the next version.</p>
@@ -2517,13 +2496,25 @@ <h3 id="-get-next"><code>--get-next</code><a class="headerlink" href="#-get-next
25172496
<p>For information on how to suppress this exit, see <a href="#avoid-raising-errors">avoid raising errors</a>.</p>
25182497
</div>
25192498
<h3 id="-allow-no-commit"><code>--allow-no-commit</code><a class="headerlink" href="#-allow-no-commit" title="Permanent link">&para;</a></h3>
2520-
<p>Allow the project version to be bumped even when there's no eligible version. This is most useful when used with <code>--increment {MAJOR,MINOR,PATCH}</code> or <code>[MANUAL_VERSION]</code></p>
2499+
<p>Allow the project version to be bumped even when there's no eligible version.</p>
2500+
<div class="admonition note">
2501+
<p class="admonition-title">Example usage</p>
25212502
<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>
2522-
cz<span class="w"> </span>bump<span class="w"> </span>--incremental<span class="w"> </span>MINOR<span class="w"> </span>--allow-no-commit
25232503

2524-
<span class="c1"># bump version to 2.0.0 even when there&#39;s no breaking changes changes or even no commits</span>
2504+
cz<span class="w"> </span>bump<span class="w"> </span>--increment<span class="w"> </span>MINOR<span class="w"> </span>--allow-no-commit
2505+
2506+
<span class="c1"># bump version to 2.0.0 even when there&#39;s no breaking changes or even no commits</span>
25252507
cz<span class="w"> </span>bump<span class="w"> </span>--allow-no-commit<span class="w"> </span><span class="m">2</span>.0.0
25262508
</code></pre></div>
2509+
</div>
2510+
<div class="admonition note">
2511+
<p class="admonition-title">Default increment</p>
2512+
<p>The increment is overridden to <code>PATCH</code> if there is no increment detected or specified.</p>
2513+
<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>
2514+
<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>
2515+
cz<span class="w"> </span>bump<span class="w"> </span>--allow-no-commit
2516+
</code></pre></div>
2517+
</div>
25272518
<h3 id="-version-scheme"><code>--version-scheme</code><a class="headerlink" href="#-version-scheme" title="Permanent link">&para;</a></h3>
25282519
<p>See <a href="#version-schemes-version-scheme">Version Schemes</a>.</p>
25292520
<h2 id="configuration-file-options">Configuration file options<a class="headerlink" href="#configuration-file-options" title="Permanent link">&para;</a></h2>
@@ -2579,15 +2570,15 @@ <h3 id="tag_format"><code>tag_format</code><a class="headerlink" href="#tag_form
25792570
<td>Prerelease (alpha, beta, release candidate)</td>
25802571
</tr>
25812572
<tr>
2582-
<td><code>$devrelease</code>, ${devrelease}`</td>
2573+
<td><code>$devrelease</code>, <code>${devrelease}</code></td>
25832574
<td>Development release</td>
25842575
</tr>
25852576
</tbody>
25862577
</table>
25872578
<h3 id="version_files"><code>version_files</code><a class="headerlink" href="#version_files" title="Permanent link">&para;</a></h3>
25882579
<p>Identify the files or glob patterns which should be updated with the new version.</p>
25892580
<p>Commitizen will update its configuration file automatically when bumping,
2590-
regarding if the file is present or not in <code>version_files</code>.</p>
2581+
regardless of whether the file is present or not in <code>version_files</code>.</p>
25912582
<p>You may specify the <code>version_files</code> in your configuration file.</p>
25922583
<div class="highlight"><span class="filename">pyproject.toml</span><pre><span></span><code><span class="k">[tool.commitizen]</span>
25932584
<span class="n">version_files</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span>
@@ -2799,7 +2790,7 @@ <h3 id="version_scheme"><code>version_scheme</code><a class="headerlink" href="#
27992790
<h2 id="avoid-raising-errors">Avoid raising errors<a class="headerlink" href="#avoid-raising-errors" title="Permanent link">&para;</a></h2>
28002791
<p>Some situations from Commitizen raise an exit code different from 0.
28012792
If the error code is different from 0, any CI or script running Commitizen might be interrupted.</p>
2802-
<p>If you have a special use case, where you don't want to raise one of this error codes, you can
2793+
<p>If you have a special use case, where you don't want to raise one of these error codes, you can
28032794
tell Commitizen to not raise them.</p>
28042795
<h3 id="recommended-use-case">Recommended use case<a class="headerlink" href="#recommended-use-case" title="Permanent link">&para;</a></h3>
28052796
<p>At the moment, we've identified that the most common error code to skip is</p>

search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)