9
9
using System . Text . RegularExpressions ;
10
10
using System . Threading . Tasks ;
11
11
using Bullseye ;
12
- using Bullseye . Internal ;
13
12
using static Bullseye . Targets ;
14
- using OperatingSystem = Bullseye . Internal . OperatingSystem ;
15
13
16
14
namespace build
17
15
{
@@ -136,18 +134,18 @@ static async Task<int> Main(string[] args)
136
134
137
135
var ( specifiedTargets , options , unknownOptions , showHelp ) = CommandLine . Parse ( filteredArguments ) ;
138
136
verbose = options . Verbose ;
139
- Host = options . Host . DetectIfAutomatic ( ) ;
137
+ Host = options . Host . DetectIfNull ( ) ;
140
138
141
- var operatingSystem =
139
+ var osPlatform =
142
140
RuntimeInformation . IsOSPlatform ( OSPlatform . Windows )
143
- ? OperatingSystem . Windows
141
+ ? OSPlatform . Windows
144
142
: RuntimeInformation . IsOSPlatform ( OSPlatform . Linux )
145
- ? OperatingSystem . Linux
143
+ ? OSPlatform . Linux
146
144
: RuntimeInformation . IsOSPlatform ( OSPlatform . OSX )
147
- ? OperatingSystem . MacOS
148
- : OperatingSystem . Unknown ;
145
+ ? OSPlatform . OSX
146
+ : OSPlatform . Create ( " Unknown" ) ;
149
147
150
- palette = new Palette ( options . NoColor , options . NoExtendedChars , options . Host , operatingSystem ) ;
148
+ palette = new Palette ( options . NoColor , options . NoExtendedChars , Host , osPlatform ) ;
151
149
152
150
var targets = specifiedTargets . ToList ( ) ;
153
151
@@ -209,9 +207,9 @@ static async Task<int> Main(string[] args)
209
207
if ( showHelp )
210
208
{
211
209
Console . WriteLine ( ) ;
212
- Console . WriteLine ( $ "{ palette . Default } Additional options:") ;
213
- Console . WriteLine ( $ " { palette . Option } --no-prerelease { palette . Default } Force the current version to be considered final{ palette . Reset } ") ;
214
- Console . WriteLine ( $ " { palette . Option } --version=<version> { palette . Default } Force the current version to equal to the specified value{ palette . Reset } ") ;
210
+ Console . WriteLine ( $ "{ palette . Text } Additional options:") ;
211
+ Console . WriteLine ( $ " { palette . Option } --no-prerelease { palette . Text } Force the current version to be considered final{ palette . Default } ") ;
212
+ Console . WriteLine ( $ " { palette . Option } --version=<version> { palette . Text } Force the current version to equal to the specified value{ palette . Default } ") ;
215
213
}
216
214
217
215
return exitCode ;
@@ -227,12 +225,12 @@ public static void WriteVerbose(string text)
227
225
228
226
public static void WriteInformation ( string text )
229
227
{
230
- Console . WriteLine ( $ " { palette . Default } (i) { text } { palette . Reset } ") ;
228
+ Console . WriteLine ( $ " { palette . Text } (i) { text } { palette . Default } ") ;
231
229
}
232
230
233
231
public static void WriteWarning ( string text )
234
232
{
235
- Console . WriteLine ( $ " { palette . Option } /!\\ { text } { palette . Reset } ") ;
233
+ Console . WriteLine ( $ " { palette . Option } /!\\ { text } { palette . Default } ") ;
236
234
}
237
235
238
236
public static void WriteImportant ( string text )
@@ -300,7 +298,7 @@ private static IEnumerable<string> WrapText(string text, int length)
300
298
301
299
private static void Write ( string text , string color )
302
300
{
303
- Console . WriteLine ( $ "{ color } { text } { palette . Reset } ") ;
301
+ Console . WriteLine ( $ "{ color } { text } { palette . Default } ") ;
304
302
}
305
303
306
304
public static IEnumerable < string > ReadLines ( string name , string ? args = null , string ? workingDirectory = null ) => SimpleExec . Command
0 commit comments