Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Versioning when using Git, solved. GitVersion looks at your git history and
works out the [Semantic Version][semver] of the commit being built.

[![Build status][azure-pipeline-badge]][azure-pipeline]
[![Build status][github-actions-badge]][github-actions]
[![codecov][codecov-badge]][codecov]

Expand Down Expand Up @@ -50,13 +49,9 @@ from The Noun Project.

[semver]: https://semver.org

[azure-pipeline]: https://dev.azure.com/GitTools/GitVersion/_build/latest?definitionId=1
[github-actions]: https://github.com/GitTools/GitVersion/actions/workflows/ci.yml

[azure-pipeline-badge]: https://dev.azure.com/GitTools/GitVersion/_apis/build/status/GitTools.GitVersion

[github-actions]: https://github.com/GitTools/GitVersion/actions

[github-actions-badge]: https://github.com/GitTools/GitVersion/workflows/CI/badge.svg
[github-actions-badge]: https://github.com/GitTools/GitVersion/actions/workflows/ci.yml/badge.svg

[codecov]: https://codecov.io/gh/GitTools/GitVersion

Expand Down
17 changes: 14 additions & 3 deletions docs/input/docs/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -628,28 +628,38 @@ Date and time in the format `yyyy-MM-ddTHH:mm:ss` (eg `commits-before:
`commits-before` will be ignored.

#### paths

A sequence of regular expressions that represent paths in the repository. Commits that modify these paths will be excluded from version calculations. For example, to filter out commits that belong to `docs`:

```yaml
ignore:
paths:
- ^docs\/
```

##### *Monorepo*

This ignore config can be used to filter only those commits that belong to a specific project in a monorepo.
As an example, consider a monorepo consisting of subdirectories for `ProjectA`, `ProjectB` and a shared `LibraryC`. For GitVersion to consider only commits that are part of `projectA` and shared library `LibraryC`, a regex that matches all paths except those starting with `ProjectA` or `LibraryC` can be used. Either one of the following configs would filter out `ProjectB`.

* Specific match on `/ProjectB/*`:

```yaml
ignore:
paths:
- `^\/ProductB\/.*`
```

* Negative lookahead on anything other than `/ProjectA/*` and `/LibraryC/*`:

```yaml
ignore:
paths:
- `^(?!\/ProductA\/|\/LibraryC\/).*`
```

A commit having changes only in `/ProjectB/*` path would be ignored. A commit having changes in the following paths wouldn't be ignored:

* `/ProductA/*`
* `/LibraryC/*`
* `/ProductA/*` and `/LibraryC/*`
Expand All @@ -658,7 +668,8 @@ A commit having changes only in `/ProjectB/*` path would be ignored. A commit ha
* `/ProductA/*` and `/ProductB/*` and `/LibraryC/*`

:::
Note: The `ignore.paths` configuration is case-sensitive. This can lead to unexpected behavior on case-insensitive file systems, such as Windows. To ensure consistent matching regardless of case, you can prefix your regular expressions with the case-insensitive flag `(?i)`. For example, `(?i)^docs\/` will match both `docs/` and `Docs/`.
Note: The `ignore.paths` configuration is case-sensitive.
This can lead to unexpected behavior on case-insensitive file systems, such as Windows. To ensure consistent matching regardless of case, you can prefix your regular expressions with the case-insensitive flag `(?i)`. For example, `(?i)^docs\/` will match both `docs/` and `Docs/`.
:::

::: {.alert .alert-warning}
Expand All @@ -683,7 +694,7 @@ The regular expression should contain the following capture groups:
* `TargetBranch` - Identifies the target branch of the merge
* `PullRequestNumber` - Captures the pull-request number

Custom merge message formats are evaluated _before_ any built in formats.
Custom merge message formats are evaluated *before* any built in formats.
Support for [Conventional Commits][conventional-commits] can be
[configured][conventional-commits-config].

Expand Down Expand Up @@ -950,7 +961,7 @@ branches:

Strategy which will look for tagged merge commits directly off the current
branch. For example `develop` → `release/1.0.0` → merge into `main` and tag
`1.0.0`. The tag is _not_ on develop, but develop should be version `1.0.0` now.
`1.0.0`. The tag is *not* on develop, but develop should be version `1.0.0` now.

### track-merge-message

Expand Down
17 changes: 14 additions & 3 deletions docs/input/docs/reference/mdsource/configuration.source.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,28 +229,38 @@ Date and time in the format `yyyy-MM-ddTHH:mm:ss` (eg `commits-before:
`commits-before` will be ignored.

#### paths

A sequence of regular expressions that represent paths in the repository. Commits that modify these paths will be excluded from version calculations. For example, to filter out commits that belong to `docs`:

```yaml
ignore:
paths:
- ^docs\/
```

##### *Monorepo*

This ignore config can be used to filter only those commits that belong to a specific project in a monorepo.
As an example, consider a monorepo consisting of subdirectories for `ProjectA`, `ProjectB` and a shared `LibraryC`. For GitVersion to consider only commits that are part of `projectA` and shared library `LibraryC`, a regex that matches all paths except those starting with `ProjectA` or `LibraryC` can be used. Either one of the following configs would filter out `ProjectB`.

* Specific match on `/ProjectB/*`:

```yaml
ignore:
paths:
- `^\/ProductB\/.*`
```

* Negative lookahead on anything other than `/ProjectA/*` and `/LibraryC/*`:

```yaml
ignore:
paths:
- `^(?!\/ProductA\/|\/LibraryC\/).*`
```

A commit having changes only in `/ProjectB/*` path would be ignored. A commit having changes in the following paths wouldn't be ignored:

* `/ProductA/*`
* `/LibraryC/*`
* `/ProductA/*` and `/LibraryC/*`
Expand All @@ -259,7 +269,8 @@ A commit having changes only in `/ProjectB/*` path would be ignored. A commit ha
* `/ProductA/*` and `/ProductB/*` and `/LibraryC/*`

:::
Note: The `ignore.paths` configuration is case-sensitive. This can lead to unexpected behavior on case-insensitive file systems, such as Windows. To ensure consistent matching regardless of case, you can prefix your regular expressions with the case-insensitive flag `(?i)`. For example, `(?i)^docs\/` will match both `docs/` and `Docs/`.
Note: The `ignore.paths` configuration is case-sensitive.
This can lead to unexpected behavior on case-insensitive file systems, such as Windows. To ensure consistent matching regardless of case, you can prefix your regular expressions with the case-insensitive flag `(?i)`. For example, `(?i)^docs\/` will match both `docs/` and `Docs/`.
:::

::: {.alert .alert-warning}
Expand All @@ -284,7 +295,7 @@ The regular expression should contain the following capture groups:
* `TargetBranch` - Identifies the target branch of the merge
* `PullRequestNumber` - Captures the pull-request number

Custom merge message formats are evaluated _before_ any built in formats.
Custom merge message formats are evaluated *before* any built in formats.
Support for [Conventional Commits][conventional-commits] can be
[configured][conventional-commits-config].

Expand Down Expand Up @@ -551,7 +562,7 @@ branches:

Strategy which will look for tagged merge commits directly off the current
branch. For example `develop` → `release/1.0.0` → merge into `main` and tag
`1.0.0`. The tag is _not_ on develop, but develop should be version `1.0.0` now.
`1.0.0`. The tag is *not* on develop, but develop should be version `1.0.0` now.

### track-merge-message

Expand Down
4 changes: 2 additions & 2 deletions docs/input/docs/usage/library.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
Order: 40
Title: Library
Description: |
Install with NuGet and use GitVersion.Core as a software library. Although this
Install with NuGet and use GitVersion.Core as a NuGet package. Although this
is an unsupported option and the API may break even between minor or
patch releases, it's a useful option to some.
CardIcon: library.svg
RedirectFrom: docs/usage/nuget-library
---

Install with NuGet and use GitVersion.Core as a software library. Although this
Install with NuGet and use GitVersion.Core as a NuGet package. Although this
is an unsupported option and the API may break even between minor or
patch releases, it's a useful option to some.

Expand Down