We love contributions to get started contributing you might need:
up-for-grabs
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. If you end up not being able to complete the task, please post another comment so others can pick it up.
Issues are also welcome, failing tests are even more welcome.
docs
folder.
Have a look at the documentation readme file for guidance
on how to improve the documentation and please include documentation updates
with your PR.See how it works in GitVersion's documentation
We have made it super easy to write tests in GitVersion. Most tests you are interested in are in GitVersionCore.Tests\IntegrationTests
.
There is a scenario class for each type of branch. For example MasterScenarios, FeatureBranchScenarios etc.
Find where your issue would logically sit. Or create a new scenario class if it doesn't fit anywhere in particular.
We are currently using NUnit, so just create a descriptive test method and attribute it with [Test]
We have a few fixtures for different scenarios.
EmptyRepositoryFixture
- Gives you an empty git repo to start withRemoteRepositoryFixture
- A local repo tracking a test remote repository. The remote repo is available through the Repository
property, the local is accessible via LocalRepository
BaseGitFlowRepositoryFixture
- A repo setup for GitFlow (has a develop branch checked out ready to go)You can use a fixture by just using
it. Like this
using (var fixture = new EmptyRepositoryFixture(new Config()))
{
}
If you are using non-default configuration just modify the Config
class before creating the fixture
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.
An example test looks like this:
fixture.Repository.MakeATaggedCommit("1.0.0");
fixture.Repository.CreateBranch("feature-test");
fixture.Repository.Checkout("feature-test");
fixture.Repository.MakeACommit();
fixture.Repository.MakeCommits(4);
fixture.AssertFullSemver("1.0.1-test.1+5");
The last line is the most important. AssertFullSemver
will run GitVersion and assert that the full SemVer it calculates is what you expect.
Even better include the fix, but a failing test is a great start
We use Cake for our build and deployment process. The way the build / release process is setup is:
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:
docker build . --build-arg GitVersionZip=GitVersion_<VERSION>.zip --tag gittools/gitversion
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。