From 82b7ac10d0adc04053096d06f560befe22ad45bc Mon Sep 17 00:00:00 2001 From: ABWassim Date: Thu, 2 Nov 2023 14:02:04 +0100 Subject: [PATCH] docs: skip-ci breaking change --- src/config/README.md | 5 ++--- src/guide/README.md | 49 ++++++++++++++++++++++++++++++++++++-------- 2 files changed, 43 insertions(+), 11 deletions(-) diff --git a/src/config/README.md b/src/config/README.md index 388b265..24f3d16 100755 --- a/src/config/README.md +++ b/src/config/README.md @@ -160,11 +160,10 @@ The config reference list all value that can be set in the `cog.toml` file at th - Type: `String` - Optional: `true` -- Description: "skip_ci" string that is appended to the end of the bump commit. It can also be - specified using `cog bump --skip-ci ` +- Description: A "skip-ci" string to add to the commits when using the ```bump``` or ```commit``` commands. Default value is ```[skip ci]```. - Example: ```toml - skip_ci = "[skip-ci]" + skip_ci = "[ci-skip]" ``` - Also see: * [User guide -> Make Cocogitto skip CI CD](../guide/#make-cocogitto-skip-ci-cd) diff --git a/src/guide/README.md b/src/guide/README.md index 85e0cad..7cd67d6 100644 --- a/src/guide/README.md +++ b/src/guide/README.md @@ -977,30 +977,63 @@ tag_prefix = "v" ## Make Cocogitto skip CI CD -Cocogitto will create a commit when performing a bump, which can trigger your CI/CD if you have one. Some CI/CD tools support a "skip_ci" string that you can add to a commit which will skip the pipeline execution. To do so with `cog`, you can use the `skip_ci` configuration in your `cog.toml` file or the `cog bump --skip-ci ` option to add a "skip_ci" pattern your CI/CD tool supports. +The ```--skip-ci``` option of the ```bump``` and ```commit``` commands offers the possibility to skip CI/CD by adding a "skip-ci" string your commits. The default string used by Cocogitto is ```[skip ci]``` but you can override it with your own string : +- Using the ```skip_ci``` configuration in the ```cog.toml```. +- Using the ```--skip-ci-override``` option of the ```bump``` and ```commit``` commands. + +Note that the ```--skip-ci-override``` option has precedence over the ```skip_ci``` configuration in the ```cog.toml```. **Example:** -```toml -skip_ci = "[skip ci]" + +```bash +❯ cog bump --skip-ci +``` + +**Result:** + +```bash +❯ git log +commit xxx (HEAD -> main, tag: 1.0.0) +Author: John Doe +Date: Tue Mar 7 15:06:18 2023 +0200 + chore(version): 1.0.0 [skip ci] ``` -or using the `cog bump` command : +**Example with ```cog.toml``` configuration:** + +```toml +skip_ci = "[ci-skip]" +``` ```bash -❯ cog bump --skip-ci "[skip ci]" +❯ cog bump --skip-ci ``` **Result:** ```bash ❯ git log -commit 213d08c8c1e12ba7d59497e6eda436a3ce63d87c (HEAD -> main, tag: 1.0.0) +commit xxx (HEAD -> main, tag: 1.0.0) Author: John Doe Date: Tue Mar 7 15:06:18 2023 +0200 - chore(version): 1.0.0 [skip ci] + chore(version): 1.0.0 [ci-skip] +``` + +**Another example using the ```--skip-ci-override``` option:** + +```bash +❯ cog bump --skip-ci-override "[ci-skip]" ``` -Note that if both `skip_ci` configuration and `--skip-ci` option are used, `cog` will take the `--skip-ci` option. +**Result:** + +```bash +❯ git log +commit xxx (HEAD -> main, tag: 1.0.0) +Author: John Doe +Date: Tue Mar 7 15:06:18 2023 +0200 + chore(version): 1.0.0 [ci-skip] +``` ## Skip untracked or uncommited changes