File tree Expand file tree Collapse file tree 3 files changed +17
-16
lines changed Expand file tree Collapse file tree 3 files changed +17
-16
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
using GitVersion ;
2
2
using GitVersion . Extensions ;
3
- using GitVersion . Generated ;
4
3
using GitVersion . Git ;
5
4
using GitVersion . Infrastructure ;
5
+ using GitVersion . SystemCommandline ;
6
6
7
7
var modules = new IGitVersionModule [ ]
8
8
{
9
9
new CoreModule ( ) ,
10
10
new LibGit2SharpCoreModule ( ) ,
11
- new CommandsModule ( ) ,
12
11
new CliModule ( )
13
12
} ;
14
13
18
17
using var serviceProvider = RegisterModules ( modules ) ;
19
18
var app = serviceProvider . GetRequiredService < IGitVersionAppRunner > ( ) ;
20
19
21
- var result = 0 ;
22
- result = await app . RunAsync ( args , cts . Token ) . ConfigureAwait ( false ) ;
20
+ var result = await app . RunAsync ( args , cts . Token ) . ConfigureAwait ( false ) ;
23
21
if ( ! Console . IsInputRedirected ) Console . ReadKey ( ) ;
24
22
return result ;
25
23
26
24
static IContainer RegisterModules ( IEnumerable < IGitVersionModule > gitVersionModules )
27
25
{
28
26
var serviceProvider = new ContainerRegistrar ( )
29
27
. RegisterModules ( gitVersionModules )
28
+ . AddLogging ( )
30
29
. Build ( ) ;
31
30
32
31
return serviceProvider ;
Original file line number Diff line number Diff line change
1
+ using GitVersion . Extensions ;
2
+ using GitVersion . Generated ;
3
+ using GitVersion . Infrastructure ;
4
+
5
+ namespace GitVersion . SystemCommandline ;
6
+
7
+ public class CliModule : IGitVersionModule
8
+ {
9
+ public void RegisterTypes ( IContainerRegistrar services )
10
+ {
11
+ services . RegisterModule ( new CommandsModule ( ) ) ;
12
+ services . AddSingleton < IGitVersionAppRunner , GitVersionAppRunner > ( ) ;
13
+ }
14
+ }
You can’t perform that action at this time.
0 commit comments