@@ -18,7 +18,7 @@ public static void Run(Arguments arguments, IFileSystem fileSystem)
18
18
var dynamicRepositoryLocation = arguments . DynamicRepositoryLocation ;
19
19
var targetBranch = arguments . TargetBranch ;
20
20
var commitId = arguments . CommitId ;
21
- var variables = ExecuteGitVersion ( fileSystem , targetUrl , dynamicRepositoryLocation , authentication , targetBranch , noFetch , targetPath , commitId ) ;
21
+ var variables = ExecuteCore . ExecuteGitVersion ( fileSystem , targetUrl , dynamicRepositoryLocation , authentication , targetBranch , noFetch , targetPath , commitId ) ;
22
22
23
23
if ( arguments . Output == OutputType . BuildServer )
24
24
{
@@ -65,37 +65,6 @@ public static void Run(Arguments arguments, IFileSystem fileSystem)
65
65
}
66
66
}
67
67
68
- static VersionVariables ExecuteGitVersion ( IFileSystem fileSystem , string targetUrl , string dynamicRepositoryLocation , Authentication authentication , string targetBranch , bool noFetch , string workingDirectory , string commitId )
69
- {
70
- var gitPreparer = new GitPreparer ( targetUrl , dynamicRepositoryLocation , authentication , targetBranch , noFetch , workingDirectory ) ;
71
- gitPreparer . InitialiseDynamicRepositoryIfNeeded ( ) ;
72
- var dotGitDirectory = gitPreparer . GetDotGitDirectory ( ) ;
73
- var projectRoot = gitPreparer . GetProjectRootDirectory ( ) ;
74
- if ( string . IsNullOrEmpty ( dotGitDirectory ) || string . IsNullOrEmpty ( projectRoot ) )
75
- {
76
- // TODO Link to wiki article
77
- throw new Exception ( string . Format ( "Failed to prepare or find the .git directory in path '{0}'." , workingDirectory ) ) ;
78
- }
79
-
80
- foreach ( var buildServer in BuildServerList . GetApplicableBuildServers ( authentication ) )
81
- {
82
- buildServer . PerformPreProcessingSteps ( dotGitDirectory , noFetch ) ;
83
- }
84
- VersionVariables variables ;
85
- var versionFinder = new GitVersionFinder ( ) ;
86
- var configuration = ConfigurationProvider . Provide ( projectRoot , fileSystem ) ;
87
-
88
- using ( var repo = RepositoryLoader . GetRepo ( dotGitDirectory ) )
89
- {
90
- var gitVersionContext = new GitVersionContext ( repo , configuration , commitId : commitId ) ;
91
- var semanticVersion = versionFinder . FindVersion ( gitVersionContext ) ;
92
- var config = gitVersionContext . Configuration ;
93
- variables = VariableProvider . GetVariablesFor ( semanticVersion , config . AssemblyVersioningScheme , config . VersioningMode , config . ContinuousDeploymentFallbackTag , gitVersionContext . IsCurrentCommitTagged ) ;
94
- }
95
-
96
- return variables ;
97
- }
98
-
99
68
static bool RunMsBuildIfNeeded ( Arguments args , string workingDirectory , VersionVariables variables )
100
69
{
101
70
if ( string . IsNullOrEmpty ( args . Proj ) ) return false ;
0 commit comments