diff --git a/docs/input/docs/reference/configuration.md b/docs/input/docs/reference/configuration.md index 57df2661aa..e185710262 100644 --- a/docs/input/docs/reference/configuration.md +++ b/docs/input/docs/reference/configuration.md @@ -37,6 +37,7 @@ The following supported workflow configurations are available in GitVersion and - GitFlow (GitFlow/v1) - GitHubFlow (GitHubFlow/v1) +- TrunkBased (TrunkBased/preview1) Example of using a `GitHubFlow` workflow with a different `tag-prefix`: @@ -338,6 +339,91 @@ is-release-branch: false is-main-branch: false ``` +The preview built-in configuration (experimental usage only) for the `TrunkBased` workflow (`workflow: TrunkBased/preview1`) looks like: + +```yaml +assembly-versioning-scheme: MajorMinorPatch +assembly-file-versioning-scheme: MajorMinorPatch +tag-prefix: '[vV]?' +version-in-branch-pattern: (?[vV]?\d+(\.\d+)?(\.\d+)?).* +major-version-bump-message: '\+semver:\s?(breaking|major)' +minor-version-bump-message: '\+semver:\s?(feature|minor)' +patch-version-bump-message: '\+semver:\s?(fix|patch)' +no-bump-message: '\+semver:\s?(none|skip)' +tag-pre-release-weight: 60000 +commit-date-format: yyyy-MM-dd +merge-message-formats: {} +update-build-number: true +semantic-version-format: Strict +strategies: +- Mainline +- ConfiguredNextVersion +branches: + main: + mode: ContinuousDeployment + label: '' + increment: Patch + prevent-increment: + of-merged-branch: true + when-current-commit-tagged: true + track-merge-target: false + regex: ^master$|^main$ + source-branches: [] + tracks-release-branches: false + is-release-branch: false + is-main-branch: true + pre-release-weight: 55000 + feature: + increment: Minor + regex: ^features?[/-](?.+) + prevent-increment: + when-current-commit-tagged: false + source-branches: + - main + pre-release-weight: 30000 + hotfix: + increment: Patch + regex: ^hotfix(es)?[/-](?.+) + prevent-increment: + when-current-commit-tagged: false + source-branches: + - main + pre-release-weight: 30000 + pull-request: + mode: ContinuousDelivery + label: PullRequest + increment: Inherit + label-number-pattern: '[/-](?\d+)' + regex: ^(pull|pull\-requests|pr)[/-] + source-branches: + - main + pre-release-weight: 30000 + unknown: + increment: Patch + regex: (?.+) + prevent-increment: + when-current-commit-tagged: false + source-branches: + - main + pre-release-weight: 30000 +ignore: + sha: [] +mode: ContinuousDelivery +label: '{BranchName}' +increment: Inherit +prevent-increment: + of-merged-branch: false + when-branch-merged: false + when-current-commit-tagged: true +track-merge-target: false +track-merge-message: true +commit-message-incrementing: Enabled +regex: '' +tracks-release-branches: false +is-release-branch: false +is-main-branch: false +``` + The details of the available options are as follows: ### workflow diff --git a/docs/input/docs/workflows/TrunkBased/v1.yml b/docs/input/docs/workflows/TrunkBased/preview1.yml similarity index 100% rename from docs/input/docs/workflows/TrunkBased/v1.yml rename to docs/input/docs/workflows/TrunkBased/preview1.yml diff --git a/src/GitVersion.Configuration/GitVersion.Configuration.csproj b/src/GitVersion.Configuration/GitVersion.Configuration.csproj index 17d9bbd4c4..cf3b09fcfe 100644 --- a/src/GitVersion.Configuration/GitVersion.Configuration.csproj +++ b/src/GitVersion.Configuration/GitVersion.Configuration.csproj @@ -40,10 +40,10 @@ - + - +