File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ <component name =" ProjectRunConfigurationManager" >
2
+ <configuration default =" false" name =" TestCommand" type =" DotNetProject" factoryName =" .NET Project" >
3
+ <option name =" EXE_PATH" value =" $PROJECT_DIR$/GitVersion.Cli/bin/Debug/net9.0/gitversion" />
4
+ <option name =" PROGRAM_PARAMETERS" value =" test --input-file test.txt" />
5
+ <option name =" WORKING_DIRECTORY" value =" $PROJECT_DIR$" />
6
+ <option name =" PASS_PARENT_ENVS" value =" 1" />
7
+ <option name =" USE_EXTERNAL_CONSOLE" value =" 0" />
8
+ <option name =" ENV_FILE_PATHS" value =" " />
9
+ <option name =" REDIRECT_INPUT_PATH" value =" " />
10
+ <option name =" PTY_MODE" value =" Auto" />
11
+ <option name =" USE_MONO" value =" 0" />
12
+ <option name =" RUNTIME_ARGUMENTS" value =" " />
13
+ <option name =" AUTO_ATTACH_CHILDREN" value =" 0" />
14
+ <option name =" MIXED_MODE_DEBUG" value =" 0" />
15
+ <option name =" PROJECT_PATH" value =" $PROJECT_DIR$/GitVersion.Cli/GitVersion.Cli.csproj" />
16
+ <option name =" PROJECT_EXE_PATH_TRACKING" value =" 1" />
17
+ <option name =" PROJECT_ARGUMENTS_TRACKING" value =" 1" />
18
+ <option name =" PROJECT_WORKING_DIRECTORY_TRACKING" value =" 0" />
19
+ <option name =" PROJECT_KIND" value =" DotNetCore" />
20
+ <option name =" PROJECT_TFM" value =" net9.0" />
21
+ <method v =" 2" >
22
+ <option name =" Build" />
23
+ </method >
24
+ </configuration >
25
+ </component >
Original file line number Diff line number Diff line change
1
+ namespace GitVersion ;
2
+
3
+ [ Command ( "test" , "Test command." ) ]
4
+ public class TestCommand : ICommand < TestCommandSettings >
5
+ {
6
+ public Task < int > InvokeAsync ( TestCommandSettings settings , CancellationToken cancellationToken = default )
7
+ {
8
+ Console . WriteLine ( "Input file: {0}" , settings . InputFile ) ;
9
+ return Task . FromResult ( 0 ) ;
10
+ }
11
+ }
12
+
13
+ public record TestCommandSettings : GitVersionSettings
14
+ {
15
+ [ Option ( "--input-file" , "The input version file" ) ]
16
+ public required string InputFile { get ; init ; }
17
+ }
You can’t perform that action at this time.
0 commit comments