From 09d65b5c0c1c8900f2c6f00d70f6d5a8edf4d058 Mon Sep 17 00:00:00 2001 From: dazinator Date: Wed, 14 Jan 2015 17:58:07 +0000 Subject: [PATCH] fixes #101 fixes #336 - Committed @MacDennis76 's fix which allows dynamic repository to run.. Although have no idea if this is an acceptable fix. --- GitVersionCore/GitHubFlow/GitHubFlowVersionFinder.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GitVersionCore/GitHubFlow/GitHubFlowVersionFinder.cs b/GitVersionCore/GitHubFlow/GitHubFlowVersionFinder.cs index 264b83760d..5c68cf80bf 100644 --- a/GitVersionCore/GitHubFlow/GitHubFlowVersionFinder.cs +++ b/GitVersionCore/GitHubFlow/GitHubFlowVersionFinder.cs @@ -1,10 +1,11 @@ +using System.IO; namespace GitVersion { public class GitHubFlowVersionFinder { public SemanticVersion FindVersion(GitVersionContext context) { - var repositoryDirectory = context.Repository.Info.WorkingDirectory; + var repositoryDirectory = context.Repository.Info.WorkingDirectory ?? new DirectoryInfo(context.Repository.Info.Path).Parent.Parent.FullName; var lastTaggedReleaseFinder = new LastTaggedReleaseFinder(context); var nextVersionTxtFileFinder = new NextVersionTxtFileFinder(repositoryDirectory, context.Configuration); var nextSemverCalculator = new NextSemverCalculator(nextVersionTxtFileFinder, lastTaggedReleaseFinder, context);