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..c87961d 100644 --- a/src/guide/README.md +++ b/src/guide/README.md @@ -977,17 +977,16 @@ 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. -**Example:** -```toml -skip_ci = "[skip ci]" -``` +Note that the ```--skip-ci-override``` has precedence over the ```skip_ci``` configuration in the ```cog.toml```. -or using the `cog bump` command : +**Example:** ```bash -❯ cog bump --skip-ci "[skip ci]" +❯ cog bump --skip-ci ``` **Result:** @@ -1000,7 +999,21 @@ Date: Tue Mar 7 15:06:18 2023 +0200 chore(version): 1.0.0 [skip ci] ``` -Note that if both `skip_ci` configuration and `--skip-ci` option are used, `cog` will take the `--skip-ci` option. +**Another example using the ```--skip-ci-override``` option:** + +```bash +❯ cog bump --skip-ci --skip-ci-override "[ci-skip]" +``` + +**Result:** + +```bash +❯ git log +commit 213d08c8c1e12ba7d59497e6eda436a3ce63d87c (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