File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed
src/CodeOfChaos.CliArgsParser.Library/CommandAtlases Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ // ---------------------------------------------------------------------------------------------------------------------
2
+ // Imports
3
+ // ---------------------------------------------------------------------------------------------------------------------
4
+ using CliArgsParser ;
5
+ using static CodeOfChaos . Ansi . AnsiColor ;
6
+
7
+ namespace CodeOfChaos . CliArgsParser . Library . CommandAtlases ;
8
+
9
+ // ---------------------------------------------------------------------------------------------------------------------
10
+ // Code
11
+ // ---------------------------------------------------------------------------------------------------------------------
12
+ public class DownloadIconAtlas : ICommandAtlas {
13
+ [ Command < DownloadIconParameters > ( "download-icon" ) ]
14
+ public async Task DownloadIcon ( DownloadIconParameters parameters ) {
15
+ // Todo use new CodeOfChaos.Ansi markup
16
+ Console . WriteLine ( Fore ( "orange" , "Starting execution 'VersionBump' " ) ) ;
17
+
18
+ // Todo create a downloader for the icon.png assets uses for nuget packages
19
+ }
20
+
21
+ }
Original file line number Diff line number Diff line change
1
+ // ---------------------------------------------------------------------------------------------------------------------
2
+ // Imports
3
+ // ---------------------------------------------------------------------------------------------------------------------
4
+ using CliArgsParser ;
5
+
6
+ namespace CodeOfChaos . CliArgsParser . Library . CommandAtlases ;
7
+
8
+ // ---------------------------------------------------------------------------------------------------------------------
9
+ // Code
10
+ // ---------------------------------------------------------------------------------------------------------------------
11
+ public class DownloadIconParameters : ICommandParameters {
12
+ [ ArgValue ( "root" , "r" ) ] [ Description ( "The root directory of the solution" ) ]
13
+ public string Root { get ; set ; } = "../../../../../" ;
14
+
15
+ [ ArgValue ( "destination" , "d" ) ] [ Description ( "The destination folder to download the icons to" ) ]
16
+ public string Destination { get ; set ; } = "assets/icon.png" ;
17
+
18
+ [ ArgValue ( "origin" , "o" ) ] [ Description ( "The icon to download" ) ]
19
+ public string ? Origin { get ; set ; }
20
+
21
+ [ ArgValue ( "projects" , "p" ) ] [ Description ( "The projects to update" ) ]
22
+ public string ? ProjectsStringValue { get ; set ; }
23
+
24
+ [ ArgValue ( "project-split" , "ps" ) ] [ Description ( "The split character to use when splitting the projects string" ) ]
25
+ public string ProjectsSplit { get ; set ; } = ";" ;
26
+
27
+ private string [ ] ? _projects ;
28
+ public string [ ] Projects => _projects ??= ProjectsStringValue ?
29
+ . Split ( ProjectsSplit )
30
+ . Where ( entry => ! string . IsNullOrWhiteSpace ( entry ) )
31
+ . ToArray ( )
32
+ ?? [ ] ;
33
+ }
You can’t perform that action at this time.
0 commit comments