Skip to content

Commit 4eb164e

Browse files
Roman Rozinovarturcic
Roman Rozinov
authored andcommitted
Markdownlint clean up of the Contributing page.
1 parent cf0c89a commit 4eb164e

File tree

2 files changed

+44
-22
lines changed

2 files changed

+44
-22
lines changed

.vscode/settings.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"cSpell.words": [
3+
"commiting",
4+
"gittools",
5+
"gitversion"
6+
]
7+
}

CONTRIBUTING.md

+37-22
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,70 @@
11
# Contributing to GitVersion
2+
23
We love contributions to get started contributing you might need:
34

4-
- [Get started with git](http://rogerdudler.github.io/git-guide)
5-
- [How to create a pull request](https://help.github.com/articles/using-pull-requests)
6-
- [An issue to work on](https://github.com/GitTools/GitVersion/labels/up-for-grabs) - We are on [Up for grabs](http://up-for-grabs.net/), our up for grabs issues are tagged `up-for-grabs`
7-
- An understanding of our [architecture](http://gitversion.readthedocs.org/en/latest/more-info/how-it-works/#architecture) and how [we write tests](#writing-tests)
5+
- [Get started with git](http://rogerdudler.github.io/git-guide)
6+
- [How to create a pull request](https://help.github.com/articles/using-pull-requests)
7+
- [An issue to work on](https://github.com/GitTools/GitVersion/labels/up-for-grabs) - We are on [Up for grabs](http://up-for-grabs.net/), our up for grabs issues are tagged `up-for-grabs`
8+
- An understanding of our [architecture](http://gitversion.readthedocs.org/en/latest/more-info/how-it-works/#architecture) and how [we write tests](#writing-tests)
89

910
Once you know how to create a pull request and have an issue to work on, just post a comment saying you will work on it.
1011
If you end up not being able to complete the task, please post another comment so others can pick it up.
1112

1213
Issues are also welcome, [failing tests](#writing-tests) are even more welcome.
1314

14-
# Contribution Guidelines
15-
- Try to use feature branches rather than developing on master.
16-
- Please include tests covering the change.
17-
- The documentation is stored in the repository under the [`docs`](docs) folder.
15+
## Contribution Guidelines
16+
17+
- Try to use feature branches rather than developing on master.
18+
- Please include tests covering the change.
19+
- The documentation is stored in the repository under the [`docs`](docs) folder.
1820
Have a look at the [documentation readme file](docs/readme.md) for guidance
1921
on how to improve the documentation and please include documentation updates
2022
with your PR.
2123

22-
# How it works
24+
## How it works
25+
2326
See [how it works](http://gitversion.readthedocs.org/en/latest/more-info/how-it-works/) in GitVersion's documentation
2427

25-
# Writing Tests
28+
## Writing Tests
29+
2630
We have made it super easy to write tests in GitVersion. Most tests you are interested in are in `GitVersionCore.Tests\IntegrationTests`.
2731

2832
There is a scenario class for each type of branch. For example MasterScenarios, FeatureBranchScenarios etc.
2933

30-
## 1. Find Appropriate Scenario class
34+
### 1. Find Appropriate Scenario class
35+
3136
Find where your issue would logically sit. Or create a new scenario class if it doesn't fit anywhere in particular.
3237

33-
## 2. Create a test method
38+
### 2. Create a test method
39+
3440
We are currently using NUnit, so just create a descriptive test method and attribute it with `[Test]`
3541

36-
## 3. Use a fixture
42+
### 3. Use a fixture
43+
3744
We have a few fixtures for different scenarios.
3845

39-
- `EmptyRepositoryFixture` - Gives you an empty git repo to start with
40-
- `RemoteRepositoryFixture` - A local repo tracking a test remote repository. The remote repo is available through the `Repository` property, the local is accessible via `LocalRepository`
41-
- `BaseGitFlowRepositoryFixture` - A repo setup for GitFlow (has a develop branch checked out ready to go)
46+
- `EmptyRepositoryFixture` - Gives you an empty git repo to start with
47+
- `RemoteRepositoryFixture` - A local repo tracking a test remote repository. The remote repo is available through the `Repository` property, the local is accessible via `LocalRepository`
48+
- `BaseGitFlowRepositoryFixture` - A repo setup for GitFlow (has a develop branch checked out ready to go)
4249

4350
You can use a fixture by just `using` it. Like this
51+
4452
``` csharp
4553
using (var fixture = new EmptyRepositoryFixture(new Config()))
4654
{
4755
}
4856
```
4957

50-
## 4. Customise config
58+
### 4. Customize config
59+
5160
If you are using non-default configuration just modify the `Config` class before creating the fixture
5261

53-
## 5. Writing the scenario
62+
### 5. Writing the scenario
63+
5464
We have a number of extension method off `IRepository` to make it easy to write tests at the flow level and not worry about creating/commiting files.
5565

5666
An example test looks like this:
67+
5768
``` csharp
5869
fixture.Repository.MakeATaggedCommit("1.0.0");
5970
fixture.Repository.CreateBranch("feature-test");
@@ -66,11 +77,12 @@ fixture.AssertFullSemver("1.0.1-test.1+5");
6677

6778
The last line is the most important. `AssertFullSemver` will run GitVersion and assert that the full SemVer it calculates is what you expect.
6879

69-
## 6. Submit a pull request with the failing test
80+
### 6. Submit a pull request with the failing test
81+
7082
Even better include the fix, but a failing test is a great start
7183

84+
## Build / Release Process
7285

73-
# Build / Release Process
7486
We use Cake for our build and deployment process. The way the build / release process is setup is:
7587

7688
1) We build releasable artifacts on AppVeyor
@@ -85,12 +97,15 @@ We use Cake for our build and deployment process. The way the build / release pr
8597
![docs/img/release-4-deploy.png](docs/img/release-4-deploy.png)
8698
1) Edit the release and do the following:
8799
1. Remove the build metadata from the tag and title (the + and everything after it)
88-
2. Paste the downloaded release notes in, you can clean them up if you want otherwise there may be closed issues which were questions etc.
100+
2. Paste the downloaded release notes in, you can clean them up if you want otherwise there may be closed issues which were questions etc.
89101
3. Tick the pre-release box if it's pre-release
90102
4. Press Publish
91103
1) Publishing tags (a git tag) the release commit, this will trigger another appveyor build which only builds tags, this build uses deploy.cake. It downloads the artifacts from that GitHub release, then performs the release
92104

93105
## Docker
106+
94107
It is a manual release step after the release now, first download the appropriate ZIP and put into a `releaseArtifacts` folder in the GitVersion repository, then run:
95108

96-
`docker build . --build-arg GitVersionZip=GitVersion_<VERSION>.zip --tag gittools/gitversion`
109+
```bash
110+
docker build . --build-arg GitVersionZip=GitVersion_<VERSION>.zip --tag gittools/gitversion
111+
```

0 commit comments

Comments
 (0)