@@ -87,7 +87,7 @@ public async Task<Components> GetSourceUrlForAlpinePackage(string componentName,
87
87
componentsData . ReleaseExternalId = GetReleaseExternalIdForAlpine ( alpinePackSourceDetails . Name , alpinePackSourceDetails . Version ) ;
88
88
componentsData . ComponentExternalId = GetComponentExternalIdForAlpine ( alpinePackSourceDetails . Name ) ;
89
89
componentsData . SourceUrl = string . IsNullOrEmpty ( alpinePackSourceDetails . SourceUrl ) ? Dataconstant . SourceUrlNotFound : alpinePackSourceDetails . SourceUrl ;
90
- componentsData . DownloadUrl = componentsData . SourceUrl . Equals ( Dataconstant . SourceUrlNotFound ) ? Dataconstant . DownloadUrlNotFound : componentsData . SourceUrl ;
90
+ componentsData . DownloadUrl = componentsData . SourceUrl . Equals ( Dataconstant . SourceUrlNotFound ) ? Dataconstant . DownloadUrlNotFound : componentsData . SourceUrl ;
91
91
}
92
92
catch ( IOException ex )
93
93
{
@@ -117,7 +117,7 @@ private static Task<AlpinePackage> GetAlpineSourceUrl(string name, string versio
117
117
if ( File . Exists ( pkgFilePath ) )
118
118
{
119
119
var sourceData = GetSourceFromAPKBUILD ( localPathforSourceRepo , name ) ;
120
- sourceURLDetails . SourceDataForAlpine = sourceData ;
120
+ sourceURLDetails . SourceDataForAlpine = sourceData ;
121
121
var sourceUrl = GetSourceUrlForAlpine ( pkgFilePath , sourceData ) ;
122
122
if ( sourceUrl . EndsWith ( FileConstant . TargzFileExtension ) || sourceUrl . EndsWith ( FileConstant . XzFileExtension ) || sourceUrl . EndsWith ( FileConstant . TgzFileExtension ) || sourceUrl . EndsWith ( FileConstant . Bz2FileExtension ) )
123
123
{
@@ -261,34 +261,28 @@ private static void CloneSource(string localPathforSourceRepo, string alpineDist
261
261
{
262
262
foreach ( string command in gitCommands )
263
263
{
264
- var process = new Process
265
- {
266
- StartInfo = new ProcessStartInfo ( )
267
- {
268
- CreateNoWindow = true ,
269
- FileName = "git" ,
270
- Arguments = command ,
271
- WorkingDirectory = localPathforSourceRepo ,
272
- }
273
- } ;
274
- process . Start ( ) ;
275
- process . WaitForExit ( ) ;
264
+ Process p = new Process ( ) ;
265
+ p . StartInfo . CreateNoWindow = true ;
266
+ p . StartInfo . FileName = "git" ;
267
+ p . StartInfo . Arguments = command ;
268
+ p . StartInfo . WorkingDirectory = localPathforSourceRepo ;
269
+
270
+ p . Start ( ) ;
271
+ p . WaitForExit ( ) ;
272
+ p . WaitForExit ( ) ;
273
+
276
274
}
277
275
}
278
276
else
279
277
{
280
- var process = new Process
281
- {
282
- StartInfo = new ProcessStartInfo ( )
283
- {
284
- CreateNoWindow = true ,
285
- FileName = "git" ,
286
- Arguments = gitCommands [ 1 ] ,
287
- WorkingDirectory = localPathforSourceRepo ,
288
- }
289
- } ;
290
- process . Start ( ) ;
291
- process . WaitForExit ( ) ;
278
+ Process p = new Process ( ) ;
279
+ p . StartInfo . CreateNoWindow = true ;
280
+ p . StartInfo . FileName = "git" ;
281
+ p . StartInfo . Arguments = gitCommands [ 1 ] ;
282
+ p . StartInfo . WorkingDirectory = localPathforSourceRepo ;
283
+
284
+ p . Start ( ) ;
285
+ p . WaitForExit ( ) ;
292
286
}
293
287
if ( Directory . Exists ( fullPath ) )
294
288
{
@@ -299,18 +293,16 @@ private static void CloneSource(string localPathforSourceRepo, string alpineDist
299
293
300
294
private static void CheckoutDistro ( string alpineDistro , string fullPath )
301
295
{
302
- var process = new Process
303
- {
304
- StartInfo = new ProcessStartInfo ( )
305
- {
306
- CreateNoWindow = true ,
307
- FileName = "git" ,
308
- Arguments = $ "checkout" + " " + alpineDistro ,
309
- WorkingDirectory = fullPath ,
310
- }
311
- } ;
312
- process . Start ( ) ;
313
- process . WaitForExit ( ) ;
296
+
297
+ Process p = new Process ( ) ;
298
+ p . StartInfo . CreateNoWindow = true ;
299
+ p . StartInfo . FileName = "git" ;
300
+ p . StartInfo . Arguments = $ "checkout" + " " + alpineDistro ;
301
+ p . StartInfo . WorkingDirectory = fullPath ;
302
+
303
+ p . Start ( ) ;
304
+ p . WaitForExit ( ) ;
305
+
314
306
}
315
307
316
308
private static List < string > GetGitCloneCommands ( )
@@ -432,14 +424,14 @@ public string GetSourceUrlForNpmPackage(string componentName, string version)
432
424
/// <param name="componentName"></param>
433
425
/// <param name="version"></param>
434
426
/// <returns>string</returns>
435
- public async Task < string > GetSourceUrlForConanPackage ( string componentName , string componenVersion )
427
+ public async Task < string > GetSourceUrlForConanPackage ( string componentName , string componenVersion )
436
428
{
437
429
438
430
var downLoadUrl = $ "{ CommonAppSettings . SourceURLConan } " + componentName + "/all/conandata.yml" ;
439
431
var deserializer = new DeserializerBuilder ( ) . WithNamingConvention ( UnderscoredNamingConvention . Instance ) . Build ( ) ;
440
432
string componentSrcURL = string . Empty ;
441
- Sources packageSourcesInfo = new Sources ( ) ;
442
- using ( HttpClient _httpClient = new HttpClient ( ) )
433
+ Sources packageSourcesInfo = new Sources ( ) ;
434
+ using ( HttpClient _httpClient = new HttpClient ( ) )
443
435
{
444
436
try
445
437
{
@@ -467,7 +459,7 @@ public async Task<string> GetSourceUrlForConanPackage(string componentName, stri
467
459
$ "Exclude if it is an internal component or manually update the SRC url") ;
468
460
Logger . Debug ( $ "GetSourceUrlForConanPackage()", ex ) ;
469
461
}
470
- catch ( YamlException ex )
462
+ catch ( YamlException ex )
471
463
{
472
464
Logger . Warn ( $ "Identification of SRC url failed for { componentName } , " +
473
465
$ "Exclude if it is an internal component or manually update the SRC url") ;
0 commit comments