Skip to content

Commit b71fed0

Browse files
committed
Update CONTRIBUTING.md
1 parent db57b6c commit b71fed0

File tree

1 file changed

+2
-33
lines changed

1 file changed

+2
-33
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,8 @@ Issues are also welcome, [failing tests](#writing-tests) are even more welcome.
1616
- Please include tests covering the change
1717
- The docs are now stored in the repository under the `Docs` folder, please include documentation updates with your PR
1818

19-
# Architecture
20-
GitVersion has three distict steps for calculating versions in v3.0.
21-
22-
1. If the current commit is tagged, the tag is used and build metadata (Excluding commit count) is added. The other two steps will not execute
23-
2. A set of strategies are evaluated to decide on the base version and some metadata about that version.
24-
These strategies include HighestReachableTag, NextVersionInConfig, MergedBranchWithVersion, VersionInBranchName etc.
25-
3. The highest base version is selected, using that base version the new version is calculated.
26-
27-
Visually it looks something like this:
28-
![Version Calculation](http://www.plantuml.com:80/plantuml/png/fLCxJyCm4DxzAsuib4P914i69De1CS38Vd6kYIN7ZcodK8aVp-KX6Y2fKCbY9NV-7lVb2WoOeoVOMRDNfH0lz1vUoNbbpGwrR3K6ws1p3rlk-bN8u972f2AC3GHEbLN8m1D1Jjg-mPuXAZvx9kL1ZW1KY5dOZczMI0Pf54VnHtf7jpaAWJg0sW-uXw4PK3Eb1sMaevfCW6i1_0m6po1l7HfPJUxvu5XYUOHLWq5MLptCudmMK9--u5glJ0dIEaVo1Dw3JgVM6Km4cM9mzyrQXHuQHnj7chhl0JcnIrHjno1wiWtgfi8eWVK_7OQAmBHrJWvORFVM2PmrE7AcWZGh-Lj0FvptVvLiUPnCdG_XhNhOov9wQ1fzv7nw5S5EwSvw6CDQNfnMwUAP0XQyQpj70nkx3Nn3p5NFY9IshbNWepKi8ublWFiSPkC0ee8El75Dv5aOxqZQBScbWpWn0Pe2wb6aM1p4Eea_0G00)
29-
30-
[Edit Diagram](http://www.plantuml.com/plantuml/form?url=http://www.plantuml.com/plantuml/png/fLCxJyCm4DxzAsuib4P914i69De1CS38Vd6kYIN7ZcodK8aVp-KX6Y2fKCbY9NV-7lVb2WoOeoVOMRDNfH0lz1vUoNbbpGwrR3K6ws1p3rlk-bN8u972f2AC3GHEbLN8m1D1Jjg-mPuXAZvx9kL1ZW1KY5dOZczMI0Pf54VnHtf7jpaAWJg0sW-uXw4PK3Eb1sMaevfCW6i1_0m6po1l7HfPJUxvu5XYUOHLWq5MLptCudmMK9--u5glJ0dIEaVo1Dw3JgVM6Km4cM9mzyrQXHuQHnj7chhl0JcnIrHjno1wiWtgfi8eWVK_7OQAmBHrJWvORFVM2PmrE7AcWZGh-Lj0FvptVvLiUPnCdG_XhNhOov9wQ1fzv7nw5S5EwSvw6CDQNfnMwUAP0XQyQpj70nkx3Nn3p5NFY9IshbNWepKi8ublWFiSPkC0ee8El75Dv5aOxqZQBScbWpWn0Pe2wb6aM1p4Eea_0G00)
31-
32-
**\*** Some strategies allow the version to be incremented, others don't. More info below
33-
**+** This version is out of context with the rest of the example. It is here just to show what happens if the check is true
34-
35-
## Base Version Strategies
36-
Currently we have the following strategies
37-
38-
- `HighestTagBaseVersionStrategy` - Finds the highest reachable tag from the current branch
39-
- `VersionInBranchBaseVersionStrategy` - Extracts version information from the branch name. eg `release/3.0.0` will find `3.0.0`
40-
- `ConfigNextVersionBaseVersionStrategy` - Returns the version from the GitVersion.yaml file
41-
- `MergeMessageBaseVersionStrategy` - Finds version numbers from merge messages. eg. `Merge 'release/3.0.0' into 'master'` will return `3.0.0`
42-
- `FallbackBaseVersionStrategy` - Always returns 0.1.0 for new repositories
43-
44-
Each strategy needs to return an instance of `BaseVersion` which has the following properties
45-
46-
- `Source` - Description of the source. eg `Merge message 'Merge 'release/3.0.0' into 'master''
47-
- `ShouldIncrement` - Some strategies should have the version incremented, others do not. eg `ConfigNextVersionBaseVersionStrategy` returns false, `HighestTagBaseVersionStrategy` returns true
48-
- `SemanticVersion` - SemVer of the base version strategy
49-
- `BaseVersionSource` - Sha of the source. Commits will be counted from this Sha. Can be null (eg ConfigNextVersionBaseVersionStrategy returns null)
50-
- `BranchNameOverride` - When `useBranchNameAsTag` is used, this allows the branch name to be changed by a base version.
51-
VersionInBranchBaseVersionStrategy uses this to strip out anything before the first - or /. So `foo` ends up being evaluated as `foo`. If in doubt, just use null
19+
# How it works
20+
See [how it works](http://gitversion.readthedocs.org/en/latest/more-info/how-it-works/) in GitVersion's documentation
5221

5322
# Writing Tests
5423
We have made it super easy to write tests in GitVersion. Most tests you are interested in are in `GitVersionCore.Tests\IntegrationTests`.

0 commit comments

Comments
 (0)