@@ -15,14 +15,14 @@ public static Config ApplyDefaults(this Config config)
1515 return config ;
1616 }
1717
18- public static VersionVariables GetVersion ( this RepositoryFixtureBase fixture , Config configuration = null , IRepository repository = null , string commitId = null , bool isForTrackedBranchOnly = true )
18+ public static VersionVariables GetVersion ( this RepositoryFixtureBase fixture , Config configuration = null , IRepository repository = null , string commitId = null , bool isForTrackedBranchOnly = true , string targetBranch = null )
1919 {
2020 if ( configuration == null )
2121 {
2222 configuration = new Config ( ) ;
2323 ConfigurationProvider . ApplyDefaultsTo ( configuration ) ;
2424 }
25- var gitVersionContext = new GitVersionContext ( repository ?? fixture . Repository , configuration , isForTrackedBranchOnly , commitId ) ;
25+ var gitVersionContext = new GitVersionContext ( repository ?? fixture . Repository , targetBranch , configuration , isForTrackedBranchOnly , commitId ) ;
2626 var executeGitVersion = ExecuteGitVersion ( gitVersionContext ) ;
2727 var variables = VariableProvider . GetVariablesFor ( executeGitVersion , gitVersionContext . Configuration , gitVersionContext . IsCurrentCommitTagged ) ;
2828 try
@@ -37,19 +37,19 @@ public static VersionVariables GetVersion(this RepositoryFixtureBase fixture, Co
3737 }
3838 }
3939
40- public static void AssertFullSemver ( this RepositoryFixtureBase fixture , string fullSemver , IRepository repository = null , string commitId = null , bool isForTrackedBranchOnly = true )
40+ public static void AssertFullSemver ( this RepositoryFixtureBase fixture , string fullSemver , IRepository repository = null , string commitId = null , bool isForTrackedBranchOnly = true , string targetBranch = null )
4141 {
42- fixture . AssertFullSemver ( new Config ( ) , fullSemver , repository , commitId , isForTrackedBranchOnly ) ;
42+ fixture . AssertFullSemver ( new Config ( ) , fullSemver , repository , commitId , isForTrackedBranchOnly , targetBranch ) ;
4343 }
4444
45- public static void AssertFullSemver ( this RepositoryFixtureBase fixture , Config configuration , string fullSemver , IRepository repository = null , string commitId = null , bool isForTrackedBranchOnly = true )
45+ public static void AssertFullSemver ( this RepositoryFixtureBase fixture , Config configuration , string fullSemver , IRepository repository = null , string commitId = null , bool isForTrackedBranchOnly = true , string targetBranch = null )
4646 {
4747 ConfigurationProvider . ApplyDefaultsTo ( configuration ) ;
4848 Console . WriteLine ( "---------" ) ;
4949
5050 try
5151 {
52- var variables = fixture . GetVersion ( configuration , repository , commitId , isForTrackedBranchOnly ) ;
52+ var variables = fixture . GetVersion ( configuration , repository , commitId , isForTrackedBranchOnly , targetBranch ) ;
5353 variables . FullSemVer . ShouldBe ( fullSemver ) ;
5454 }
5555 catch ( Exception )
0 commit comments