Skip to content

Commit

Permalink
license
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Sep 4, 2013
1 parent 25060cd commit 05d3af0
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 19 deletions.
4 changes: 2 additions & 2 deletions GitFlowVersion/BranchFinders/DevelopVersionFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ namespace GitFlowVersion

class DevelopVersionFinder
{
public Commit Commit { get; set; }
public Repository Repository { get; set; }
public Commit Commit;
public Repository Repository;

public SemanticVersion FindVersion()
{
Expand Down
6 changes: 3 additions & 3 deletions GitFlowVersion/BranchFinders/FeatureVersionFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ namespace GitFlowVersion

class FeatureVersionFinder
{
public Commit Commit { get; set; }
public Repository Repository { get; set; }
public Branch FeatureBranch { get; set; }
public Commit Commit;
public Repository Repository;
public Branch FeatureBranch;

public SemanticVersion FindVersion()
{
Expand Down
8 changes: 4 additions & 4 deletions GitFlowVersion/BranchFinders/HotfixVersionFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ namespace GitFlowVersion

class HotfixVersionFinder
{
public Commit Commit { get; set; }
public Repository Repository { get; set; }
public Branch HotfixBranch { get; set; }
public Branch MasterBranch { get; set; }
public Commit Commit;
public Repository Repository;
public Branch HotfixBranch;
public Branch MasterBranch;

public SemanticVersion FindVersion()
{
Expand Down
6 changes: 3 additions & 3 deletions GitFlowVersion/BranchFinders/MasterVersionFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ namespace GitFlowVersion

class MasterVersionFinder
{
public Commit Commit { get; set; }
public Repository Repository { get; set; }
public Branch MasterBranch { get; set; }
public Commit Commit;
public Repository Repository;
public Branch MasterBranch;

public SemanticVersion FindVersion()
{
Expand Down
6 changes: 3 additions & 3 deletions GitFlowVersion/BranchFinders/PullVersionFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ namespace GitFlowVersion

class PullVersionFinder
{
public Commit Commit { get; set; }
public Repository Repository { get; set; }
public Branch PullBranch { get; set; }
public Commit Commit;
public Repository Repository;
public Branch PullBranch;

public SemanticVersion FindVersion()
{
Expand Down
6 changes: 3 additions & 3 deletions GitFlowVersion/BranchFinders/ReleaseVersionFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ namespace GitFlowVersion

class ReleaseVersionFinder
{
public Commit Commit { get; set; }
public Repository Repository { get; set; }
public Branch ReleaseBranch { get; set; }
public Commit Commit;
public Repository Repository;
public Branch ReleaseBranch;

public SemanticVersion FindVersion()
{
Expand Down
2 changes: 1 addition & 1 deletion GitFlowVersion/SemanticVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class SemanticVersion : IComparable<SemanticVersion>
public int PreRelease;
public Stage Stage;

public string Suffix { get; set; }
public string Suffix;

public static SemanticVersion FromMajorMinorPatch(string versionString)
{
Expand Down
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2013 NServiceBus Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
![Icon](https://raw.github.com/Particular/GitFlowVersion/master/Icon/package_icon.png)

## The Problem

Our builds are getting more complex and as we're moving towards scm structure with a lot of fine grained repos we need to take a convention based approach for our assembly versioning.
Expand Down Expand Up @@ -103,5 +105,6 @@ Additional labels for pre-release and build metadata are available as extensions

![](http://nvie.com/img/2009/12/Screen-shot-2009-12-24-at-11.32.03.png)

## Icon

<a href="http://thenounproject.com/noun/tree/#icon-No13389" target="_blank">Tree</a> designed by <a href="http://thenounproject.com/david.chapman" target="_blank">David Chapman</a> from The Noun Project
23 changes: 23 additions & 0 deletions Tests/IntegrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,29 @@ public void NServiceBusMaster()
Debug.WriteLine(version.Suffix);
}
}
[Test,Explicit]
public void NServiceBusHotfix()
{
using (var repository = new Repository(@"C:\Code\Particular\NServiceBus"))
{
var branch = repository.Branches.First(x => x.Name == "hotfix-4.0.4");
var commit = branch.Commits.First();

var finder = new GitFlowVersionFinder
{
Commit = commit,
Repository = repository,
Branch = branch
};
var version = finder.FindVersion();
Debug.WriteLine(version.Major);
Debug.WriteLine(version.Minor);
Debug.WriteLine(version.Patch);
Debug.WriteLine(version.PreRelease);
Debug.WriteLine(version.Stage);
Debug.WriteLine(version.Suffix);
}
}

[Test,Explicit]
public void NServiceBusDevelop()
Expand Down

0 comments on commit 05d3af0

Please sign in to comment.