Skip to content

Commit d332e92

Browse files
authored
Merge pull request #4882 from arturcic/feature/docs
docs: Clarify library terminology and update GitHub Actions links
2 parents 2a1bbe4 + 4f886e3 commit d332e92

4 files changed

Lines changed: 32 additions & 15 deletions

File tree

README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
Versioning when using Git, solved. GitVersion looks at your git history and
44
works out the [Semantic Version][semver] of the commit being built.
55

6-
[![Build status][azure-pipeline-badge]][azure-pipeline]
76
[![Build status][github-actions-badge]][github-actions]
87
[![codecov][codecov-badge]][codecov]
98

@@ -50,13 +49,9 @@ from The Noun Project.
5049

5150
[semver]: https://semver.org
5251

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

55-
[azure-pipeline-badge]: https://dev.azure.com/GitTools/GitVersion/_apis/build/status/GitTools.GitVersion
56-
57-
[github-actions]: https://github.com/GitTools/GitVersion/actions
58-
59-
[github-actions-badge]: https://github.com/GitTools/GitVersion/workflows/CI/badge.svg
54+
[github-actions-badge]: https://github.com/GitTools/GitVersion/actions/workflows/ci.yml/badge.svg
6055

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

docs/input/docs/reference/configuration.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -628,28 +628,38 @@ Date and time in the format `yyyy-MM-ddTHH:mm:ss` (eg `commits-before:
628628
`commits-before` will be ignored.
629629

630630
#### paths
631+
631632
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`:
633+
632634
```yaml
633635
ignore:
634636
paths:
635637
- ^docs\/
636638
```
639+
637640
##### *Monorepo*
641+
638642
This ignore config can be used to filter only those commits that belong to a specific project in a monorepo.
639643
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`.
644+
640645
* Specific match on `/ProjectB/*`:
646+
641647
```yaml
642648
ignore:
643649
paths:
644650
- `^\/ProductB\/.*`
645651
```
652+
646653
* Negative lookahead on anything other than `/ProjectA/*` and `/LibraryC/*`:
654+
647655
```yaml
648656
ignore:
649657
paths:
650658
- `^(?!\/ProductA\/|\/LibraryC\/).*`
651659
```
660+
652661
A commit having changes only in `/ProjectB/*` path would be ignored. A commit having changes in the following paths wouldn't be ignored:
662+
653663
* `/ProductA/*`
654664
* `/LibraryC/*`
655665
* `/ProductA/*` and `/LibraryC/*`
@@ -658,7 +668,8 @@ A commit having changes only in `/ProjectB/*` path would be ignored. A commit ha
658668
* `/ProductA/*` and `/ProductB/*` and `/LibraryC/*`
659669

660670
:::
661-
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/`.
671+
Note: The `ignore.paths` configuration is case-sensitive.
672+
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/`.
662673
:::
663674

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

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

@@ -950,7 +961,7 @@ branches:
950961

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

955966
### track-merge-message
956967

docs/input/docs/reference/mdsource/configuration.source.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,28 +229,38 @@ Date and time in the format `yyyy-MM-ddTHH:mm:ss` (eg `commits-before:
229229
`commits-before` will be ignored.
230230

231231
#### paths
232+
232233
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`:
234+
233235
```yaml
234236
ignore:
235237
paths:
236238
- ^docs\/
237239
```
240+
238241
##### *Monorepo*
242+
239243
This ignore config can be used to filter only those commits that belong to a specific project in a monorepo.
240244
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`.
245+
241246
* Specific match on `/ProjectB/*`:
247+
242248
```yaml
243249
ignore:
244250
paths:
245251
- `^\/ProductB\/.*`
246252
```
253+
247254
* Negative lookahead on anything other than `/ProjectA/*` and `/LibraryC/*`:
255+
248256
```yaml
249257
ignore:
250258
paths:
251259
- `^(?!\/ProductA\/|\/LibraryC\/).*`
252260
```
261+
253262
A commit having changes only in `/ProjectB/*` path would be ignored. A commit having changes in the following paths wouldn't be ignored:
263+
254264
* `/ProductA/*`
255265
* `/LibraryC/*`
256266
* `/ProductA/*` and `/LibraryC/*`
@@ -259,7 +269,8 @@ A commit having changes only in `/ProjectB/*` path would be ignored. A commit ha
259269
* `/ProductA/*` and `/ProductB/*` and `/LibraryC/*`
260270

261271
:::
262-
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/`.
272+
Note: The `ignore.paths` configuration is case-sensitive.
273+
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/`.
263274
:::
264275

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

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

@@ -551,7 +562,7 @@ branches:
551562

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

556567
### track-merge-message
557568

docs/input/docs/usage/library.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
Order: 40
33
Title: Library
44
Description: |
5-
Install with NuGet and use GitVersion.Core as a software library. Although this
5+
Install with NuGet and use GitVersion.Core as a NuGet package. Although this
66
is an unsupported option and the API may break even between minor or
77
patch releases, it's a useful option to some.
88
CardIcon: library.svg
99
RedirectFrom: docs/usage/nuget-library
1010
---
1111

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

0 commit comments

Comments
 (0)