15 minute read

This preset can be used by setting the preset global configuration option value to extended and brings rich standard configurations suitable for projects with several options in place.

Changelog

A standard changelog configuration is included in this preset. The destination file is CHANGELOG.md (in the current working directory) and is rendered using the default template.

The rendered changelog uses the default template so its content is flat and no links are produced to any specific hosting service. Sections include commits matched by both the Conventional Commits and gitmoji conventions.

This corresponds to the following configuration options:

Name Value
changelog/path CHANGELOG.md
changelog/sections/Added "^(feat|:boom:|:sparkles:)$"
changelog/sections/Fixed ^(fix|:bug:|:ambulance:)$
changelog/sections/Removed ^:fire:$
changelog/sections/Security ^:lock:$

Commit message conventions

The Conventional Commits, Conventional Commits For Merge and gitmoji conventions come with this preset. Conventional Commits and gitmoji are enabled by default, while Conventional Commits For Merge is not.

The Conventional Commits For Merge convention is not compliant to Conventional Commits and is not officially supported. It is useful when parsing merge commits bringing details on multiple commits (usually squashed), each one with it’s message title listed in the body of the merge commit message. This convention is able to match the message multiple times, each time yielding to a (potentially) different bump identifier. If you want to use this convention and you’re using this preset you need to enable it explicitly, otherwise you can copy its configuration attributes below to your custom configuration.

This corresponds to the following configuration options:

Name Value
commitMessageConventions/enabled [“conventionalCommits”, “gitmoji”]
commitMessageConventions/conventionalCommits/expression (?m)^(?<type>[a-zA-Z0-9_]+)(\((?<scope>[a-z ]+)\))?(!)?:( (?<title>.+))$(?s).*
commitMessageConventions/conventionalCommits/bumpExpressions major” = “(?s)(?m)^[a-zA-Z0-9_]+(!: .*|.*^(BREAKING( |-)CHANGE: )).*”, “minor” = “(?s)(?m)^feat(!{0})(\([a-z ]+\))?: (?!.*^(BREAKING( |-)CHANGE: )).*”, “patch” = “(?s)(?m)^fix(!{0})(\([a-z ]+\))?: (?!.*^(BREAKING( |-)CHANGE: )).*
commitMessageConventions/conventionalCommitsForMerge/expression (?<type>[a-zA-Z0-9_]+)(!)?(\\((?<scope>[a-z ]+)\\))?:( (?<title>.+))
commitMessageConventions/conventionalCommitsForMerge/bumpExpressions major” = “(?s)(?m)[a-zA-Z0-9_]+(!: .*|.*^(BREAKING( |-)CHANGE: )).*”, “minor” = “(?s)(?m)feat(!{0})(\\([a-z ]+\\))?: (?!.*^(BREAKING( |-)CHANGE: )).*”, “patch” = “(?s)(?m)fix(!{0})(\\([a-z ]+\\))?: (?!.*^(BREAKING( |-)CHANGE: )).*
commitMessageConventions/gitmoji/expression (?m)^(:(?<type>[a-zA-Z0-9_]+):)( (?<title>.+))?$(?s).*
commitMessageConventions/gitmoji/bumpExpressions major” = “(?m)^:boom:(?s).*”, “minor” = “(?m)^:sparkles:(?s).*”, “patch” = “(?m)^:(zap|bug|ambulance|lipstick|lock|arrow_down|arrow_up|pushpin|chart_with_upwards_trend|heavy_plus_sign|heavy_minus_sign|wrench|globe_with_meridians|pencil2|rewind|package|alien|bento|wheelchair|speech_balloon|card_file_box|children_crossing|iphone|egg|alembic|mag|label|triangular_flag_on_post|goal_net|dizzy|wastebasket|passport_control|adhesive_bandage):(?s).*

Please note that gitmoji is listed after Conventional Commits so when a commit message is evaluated, gitmoji is only taken into account if matching it against Conventional Commit does not yield to a positive match.

Release types

This preset comes with a set of release types, suitable for a mainline branching model plus integration, maturity, feature, fix, hotfix, release and maintenance. An additional release type called internal is configured as a fallback when the mainline isn’t matched.

You may notice that fix and hotfix are different types in that hotfix is meant to deliver (and publish) a new release while the (simple) fix is supposed to happen under regular conditions, with no need to issue a new release, and behaves pretty much like a feature release type with just a different prefix in branches and tags.

Please note that even if a release type has its publish flag enabled, publication to remote services doesn’t happen because no service is listed in the publicationServices list. If you want to publish releases using this preset as a starting point you need to override the releaseTypes/publicationServices with the services you want to use as target (which may be the ones configured in the preset services or some custom one).

This corresponds to the following configuration options:

Name Value
releaseTypes/enabled [“mainline”, “integration”, “maturity”, “feature”, “fix”, “hotfix”, “release”, “maintenance”, “internal”]
releaseTypes/publicationServices Empty
releaseTypes/mainline/collapseVersions false
releaseTypes/mainline/collapsedVersionQualifier Empty
releaseTypes/mainline/description Empty
releaseTypes/mainline/filterTags "^({{configuration.releasePrefix}})?([0-9]\d*)\.([0-9]\d*)\.([0-9]\d*)$"
releaseTypes/mainline/gitCommit "false"
releaseTypes/mainline/gitCommitMessage Empty (use default)
releaseTypes/mainline/gitPush "true"
releaseTypes/mainline/gitTag "true"
releaseTypes/mainline/gitTagMessage Empty (use default)
releaseTypes/mainline/identifiers Empty
releaseTypes/mainline/matchBranches "^(master|main)$"
releaseTypes/mainline/matchEnvironmentVariables Empty
releaseTypes/mainline/matchWorkspaceStatus "CLEAN"
releaseTypes/mainline/publish "true"
releaseTypes/mainline/versionRange Empty
releaseTypes/mainline/versionRangeFromBranchName false
releaseTypes/integration/collapseVersions true
releaseTypes/integration/collapsedVersionQualifier "{{#sanitizeLower}}{{branch}}{{/sanitizeLower}}"
releaseTypes/integration/description Empty
releaseTypes/integration/filterTags "^({{configuration.releasePrefix}})?([0-9]\d*)\.([0-9]\d*)\.([0-9]\d*)(-(develop|development|integration|latest)(\.([0-9]\d*))?)$"
releaseTypes/integration/gitCommit "false"
releaseTypes/integration/gitCommitMessage Empty (use default)
releaseTypes/integration/gitPush "true"
releaseTypes/integration/gitTag "true"
releaseTypes/integration/gitTagMessage Empty (use default)
releaseTypes/integration/identifiers Empty
releaseTypes/integration/matchBranches "^(develop|development|integration|latest)$"
releaseTypes/integration/matchEnvironmentVariables Empty
releaseTypes/integration/matchWorkspaceStatus "CLEAN"
releaseTypes/integration/publish "true"
releaseTypes/integration/versionRange Empty
releaseTypes/integration/versionRangeFromBranchName false
releaseTypes/maturity/collapseVersions true
releaseTypes/maturity/collapsedVersionQualifier "{{#sanitizeLower}}{{branch}}{{/sanitizeLower}}"
releaseTypes/maturity/description Empty
releaseTypes/maturity/filterTags "^({{configuration.releasePrefix}})?([0-9]\d*)\.([0-9]\d*)\.([0-9]\d*)(-(alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)(\.([0-9]\d*))?)?$"
releaseTypes/maturity/gitCommit "false"
releaseTypes/maturity/gitCommitMessage Empty (use default)
releaseTypes/maturity/gitPush "true"
releaseTypes/maturity/gitTag "true"
releaseTypes/maturity/gitTagMessage Empty (use default)
releaseTypes/maturity/identifiers Empty
releaseTypes/maturity/matchBranches "^(alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)$"
releaseTypes/maturity/matchEnvironmentVariables Empty
releaseTypes/maturity/matchWorkspaceStatus "CLEAN"
releaseTypes/maturity/publish "true"
releaseTypes/maturity/versionRange Empty
releaseTypes/maturity/versionRangeFromBranchName false
releaseTypes/feature/collapseVersions true
releaseTypes/feature/collapsedVersionQualifier "{{#sanitizeLower}}{{branch}}{{/sanitizeLower}}"
releaseTypes/feature/description Empty
releaseTypes/feature/filterTags "^({{configuration.releasePrefix}})?([0-9]\d*)\.([0-9]\d*)\.([0-9]\d*)(-(feat|feature)(([0-9a-zA-Z]*)(\.([0-9]\d*))?)?)$"
releaseTypes/feature/gitCommit "false"
releaseTypes/feature/gitCommitMessage Empty (use default)
releaseTypes/feature/gitPush "false"
releaseTypes/feature/gitTag "false"
releaseTypes/feature/gitTagMessage Empty (use default)
releaseTypes/feature/identifiers Empty
releaseTypes/feature/matchBranches "^(feat|feature)((-|\\/)[0-9a-zA-Z-_]+)?$"
releaseTypes/feature/matchEnvironmentVariables Empty
releaseTypes/feature/matchWorkspaceStatus Empty
releaseTypes/feature/publish "false"
releaseTypes/feature/versionRange Empty
releaseTypes/feature/versionRangeFromBranchName false
releaseTypes/fix/collapseVersions true
releaseTypes/fix/collapsedVersionQualifier "{{#sanitizeLower}}{{branch}}{{/sanitizeLower}}"
releaseTypes/fix/description Empty
releaseTypes/fix/filterTags "^({{configuration.releasePrefix}})?([0-9]\d*)\.([0-9]\d*)\.([0-9]\d*)(-fix(([0-9a-zA-Z]*)(\.([0-9]\d*))?)?)$"
releaseTypes/fix/gitCommit "false"
releaseTypes/fix/gitCommitMessage Empty (use default)
releaseTypes/fix/gitPush "true"
releaseTypes/fix/gitTag "false"
releaseTypes/fix/gitTagMessage Empty (use default)
releaseTypes/fix/identifiers Empty
releaseTypes/fix/matchBranches "^fix((-|\/)[0-9a-zA-Z-_]+)?$"
releaseTypes/fix/matchEnvironmentVariables Empty
releaseTypes/fix/matchWorkspaceStatus Empty
releaseTypes/fix/publish "false"
releaseTypes/fix/versionRange Empty
releaseTypes/fix/versionRangeFromBranchName false
releaseTypes/hotfix/collapseVersions true
releaseTypes/hotfix/collapsedVersionQualifier "{{#sanitizeLower}}{{branch}}{{/sanitizeLower}}"
releaseTypes/hotfix/description Empty
releaseTypes/hotfix/filterTags "^({{configuration.releasePrefix}})?([0-9]\d*)\.([0-9]\d*)\.([0-9]\d*)(-hotfix(([0-9a-zA-Z]*)(\.([0-9]\d*))?)?)$"
releaseTypes/hotfix/gitCommit "false"
releaseTypes/hotfix/gitCommitMessage Empty (use default)
releaseTypes/hotfix/gitPush "true"
releaseTypes/hotfix/gitTag "true"
releaseTypes/hotfix/gitTagMessage Empty (use default)
releaseTypes/hotfix/identifiers Empty
releaseTypes/hotfix/matchBranches "^hotfix((-|\/)[0-9a-zA-Z-_]+)?$"
releaseTypes/hotfix/matchEnvironmentVariables Empty
releaseTypes/hotfix/matchWorkspaceStatus Empty
releaseTypes/hotfix/publish "true"
releaseTypes/hotfix/versionRange Empty
releaseTypes/hotfix/versionRangeFromBranchName false
releaseTypes/release/collapseVersions true
releaseTypes/release/collapsedVersionQualifier "{{#firstLower}}{{branch}}{{/firstLower}}"
releaseTypes/release/description Empty
releaseTypes/release/filterTags "^({{configuration.releasePrefix}})?([0-9]\d*)\.([0-9]\d*)\.([0-9]\d*)(-(rel|release)((\.([0-9]\d*))?)?)$"
releaseTypes/release/gitCommit "false"
releaseTypes/release/gitCommitMessage Empty (use default)
releaseTypes/release/gitPush "true"
releaseTypes/release/gitTag "true"
releaseTypes/release/gitTagMessage Empty (use default)
releaseTypes/release/identifiers Empty
releaseTypes/release/matchBranches "^(rel|release)(-|\/)({{configuration.releasePrefix}})?([0-9|x]\d*)(\.([0-9|x]\d*)(\.([0-9|x]\d*))?)?$"
releaseTypes/release/matchEnvironmentVariables Empty
releaseTypes/release/matchWorkspaceStatus "CLEAN"
releaseTypes/release/publish "false"
releaseTypes/release/versionRange Empty
releaseTypes/release/versionRangeFromBranchName true
releaseTypes/maintenance/collapseVersions false
releaseTypes/maintenance/collapsedVersionQualifier Empty
releaseTypes/maintenance/description Empty
releaseTypes/maintenance/filterTags "^({{configuration.releasePrefix}})?([0-9]\d*)\.([0-9]\d*)\.([0-9]\d*)$"
releaseTypes/maintenance/gitCommit "false"
releaseTypes/maintenance/gitCommitMessage Empty (use default)
releaseTypes/maintenance/gitPush "true"
releaseTypes/maintenance/gitTag "true"
releaseTypes/maintenance/gitTagMessage Empty (use default)
releaseTypes/maintenance/identifiers Empty
releaseTypes/maintenance/matchBranches "^[a-zA-Z]*([0-9|x]\d*)(\.([0-9|x]\d*)(\.([0-9|x]\d*))?)?$"
releaseTypes/maintenance/matchEnvironmentVariables Empty
releaseTypes/maintenance/matchWorkspaceStatus "CLEAN"
releaseTypes/maintenance/publish "true"
releaseTypes/maintenance/versionRange Empty
releaseTypes/maintenance/versionRangeFromBranchName true
releaseTypes/internal/collapseVersions true
releaseTypes/internal/collapsedVersionQualifier "internal"
releaseTypes/internal/description Empty
releaseTypes/internal/filterTags Empty
releaseTypes/internal/gitCommit "false"
releaseTypes/internal/gitCommitMessage Empty (use default)
releaseTypes/internal/gitPush "false"
releaseTypes/internal/gitTag "false"
releaseTypes/internal/gitTagMessage Empty (use default)
releaseTypes/internal/identifiers/0/position "BUILD"
releaseTypes/internal/identifiers/0/qualifier timestamp
releaseTypes/internal/identifiers/0/value "{{#timestampYYYYMMDDHHMMSS}}{{timestamp}}{{/timestampYYYYMMDDHHMMSS}}"
releaseTypes/internal/matchBranches Empty
releaseTypes/internal/matchEnvironmentVariables Empty
releaseTypes/internal/matchWorkspaceStatus Empty
releaseTypes/internal/publish "false"
releaseTypes/internal/versionRange Empty
releaseTypes/internal/versionRangeFromBranchName false

Services

The GitHub and GitLab services are available with this preset. They both use standard remote URIs so unless you use a privately hosted instance you don’t need to change it. Authentication tokens are read from environment variables (GITHUB_TOKEN and GITLAB_TOKEN, respectively) so you can just set those variables to a valid Personal Access Token and you’re set.

You still need to set the remaining options.

This corresponds to the following configuration options:

Name Value
services/github/type GITHUB
services/github/options/AUTHENTICATION_TOKEN "{{#environmentVariable}}GITHUB_TOKEN{{/environmentVariable}}"
services/github/options/REPOSITORY_NAME Empty
services/github/options/REPOSITORY_OWNER Empty
services/gitlab/type GITLAB
services/gitlab/options/AUTHENTICATION_TOKEN "{{#environmentVariable}}GITLAB_TOKEN{{/environmentVariable}}"
services/gitlab/options/REPOSITORY_NAME Empty
services/gitlab/options/REPOSITORY_OWNER Empty

Substitutions

Substitutions for a commn set of technologies is provided with this preset (names are the rule names you can use to enable the rules):

  • cargo_version: sets the version attribute in Cargo.toml files in the project directory, useful for Rust projects
  • composer_version: sets the version attribute in composer.json files in the project directory, useful for PHP projects
  • dart_version: sets the version attribute in pubspec.yaml files in the project directory, useful for Flutter and Dart projects
  • elixir_version: sets the version attribute in mix.exs files in the project directory, useful for Elixir projects
  • expo_version: sets the version attribute in app.json and app.config.json files in the project directory, useful for React projects
  • helm_version: sets the version attribute in Chart.yaml files in the project directory, useful for Rust projects
  • node_version: sets the version attribute in package.json files in the project directory, useful for Node projects
  • text_version: writes the version in version.txt files in the project directory, useful in many project automations

All these presets replace the version number in files at any depth in the project layout so, for example, you can have multiple package.json file in your project tree and they will all get the updated version number. If this behavior doesn’t fit your needs you can just override the substitution rule and make the files attribute more specific.

This corresponds to the following configuration options:

Name Value
substitutions/enabled none
substitutions/cargo_version/files **/Cargo.toml
substitutions/cargo_version/match version(\\s)*=(\\s)*(\"|')?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?(\"|')?
substitutions/cargo_version/replace version = \"{{version}}\"
substitutions/composer_version/files **/composer.json
substitutions/composer_version/match \"version\"(\\s)*:(\\s)*\"(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?\"
substitutions/composer_version/replace \"version\": \"{{version}}\"
substitutions/dart_version/files **/pubspec.yaml
substitutions/dart_version/match (\"|')?version(\"|')?(\\s)*:(\\s)*(\"|')?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?(\"|')?
substitutions/dart_version/replace version: \"{{version}}\"
substitutions/elixir_version/files **/mix.exs
substitutions/elixir_version/match version(\\s)*:(\\s)*\"(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?\"
substitutions/elixir_version/replace version: \"{{version}}\"
substitutions/expo_version/files **/{app,app.config}.json
substitutions/expo_version/match \"version\"(\\s)*:(\\s)*\"(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?\"
substitutions/expo_version/replace \"version\": \"{{version}}\"
substitutions/helm_version/files **/Chart.yaml
substitutions/helm_version/match (\"|')?version(\"|')?(\\s)*:(\\s)*(\"|')?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?(\"|')?
substitutions/helm_version/replace version: \"{{version}}\"
substitutions/node_version/files **/package.json
substitutions/node_version/match \"version\"(\\s)*:(\\s)*\"(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?\"
substitutions/node_version/replace \"version\": \"{{version}}\"
substitutions/text_version/files **/version.txt
substitutions/text_version/match (0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?
substitutions/text_version/replace {{version}}