@@ -157,7 +157,7 @@ public Command BuildRootCommand()
157
157
// rootCommand.Add(BuildDeployCommand());
158
158
// rootCommand.Add(BuildListCommand());
159
159
// rootCommand.Add(BuildDeleteCommand());
160
- rootCommand . Add ( BuildDeploymentProjectCommand ( ) ) ;
160
+ // rootCommand.Add(BuildDeploymentProjectCommand());
161
161
rootCommand . Add ( BuildServerModeCommand ( ) ) ;
162
162
}
163
163
@@ -436,94 +436,94 @@ public Command BuildRootCommand()
436
436
// return listCommand;
437
437
// }
438
438
439
- /// <summary>
440
- /// Builds the top level command called "deployment-project" which supports the creation and saving of the
441
- /// CDK deployment project.
442
- /// </summary>
443
- /// <returns>An instance of the <see cref="Command"/> class</returns>
444
- private Command BuildDeploymentProjectCommand ( )
445
- {
446
- var deploymentProjectCommand = new Command ( "deployment-project" ,
447
- "Save the deployment project inside a user provided directory path." ) ;
448
-
449
- var generateDeploymentProjectCommand = new Command ( "generate" ,
450
- "Save the deployment project inside a user provided directory path without proceeding with a deployment" ) ;
451
-
452
- lock ( s_child_command_lock )
453
- {
454
- generateDeploymentProjectCommand . Add ( _optionOutputDirectory ) ;
455
- generateDeploymentProjectCommand . Add ( _optionDiagnosticLogging ) ;
456
- generateDeploymentProjectCommand . Add ( _optionProjectPath ) ;
457
- generateDeploymentProjectCommand . Add ( _optionProjectDisplayName ) ;
458
- }
459
-
460
- generateDeploymentProjectCommand . Handler = CommandHandler . Create ( async ( GenerateDeploymentProjectCommandHandlerInput input ) =>
461
- {
462
- try
463
- {
464
- _toolInteractiveService . Diagnostics = input . Diagnostics ;
465
- var projectDefinition = await _projectParserUtility . Parse ( input . ProjectPath ?? "" ) ;
466
-
467
- var saveDirectory = input . Output ;
468
- var projectDisplayName = input . ProjectDisplayName ;
469
-
470
- OrchestratorSession session = new OrchestratorSession ( projectDefinition ) ;
471
-
472
- var targetApplicationFullPath = new DirectoryInfo ( projectDefinition . ProjectPath ) . FullName ;
473
-
474
- if ( ! string . IsNullOrEmpty ( saveDirectory ) )
475
- {
476
- var targetApplicationDirectoryFullPath = new DirectoryInfo ( targetApplicationFullPath ) . Parent ! . FullName ;
477
- saveDirectory = Path . GetFullPath ( saveDirectory , targetApplicationDirectoryFullPath ) ;
478
- }
479
-
480
- var generateDeploymentProject = new GenerateDeploymentProjectCommand (
481
- _toolInteractiveService ,
482
- _consoleUtilities ,
483
- _cdkProjectHandler ,
484
- _commandLineWrapper ,
485
- _directoryManager ,
486
- _fileManager ,
487
- session ,
488
- _deploymentManifestEngine ,
489
- _recipeHandler ,
490
- targetApplicationFullPath ) ;
491
-
492
- await generateDeploymentProject . ExecuteAsync ( saveDirectory , projectDisplayName ) ;
493
-
494
- return CommandReturnCodes . SUCCESS ;
495
- }
496
- catch ( Exception e ) when ( e . IsAWSDeploymentExpectedException ( ) )
497
- {
498
- if ( input . Diagnostics )
499
- _toolInteractiveService . WriteErrorLine ( e . PrettyPrint ( ) ) ;
500
- else
501
- {
502
- _toolInteractiveService . WriteErrorLine ( string . Empty ) ;
503
- _toolInteractiveService . WriteErrorLine ( e . Message ) ;
504
- }
505
-
506
- // bail out with an non-zero return code.
507
- return CommandReturnCodes . USER_ERROR ;
508
- }
509
- catch ( Exception e )
510
- {
511
- // This is a bug
512
- _toolInteractiveService . WriteErrorLine (
513
- "Unhandled exception. This is a bug. Please copy the stack trace below and file a bug at https://github.com/aws/aws-dotnet-deploy. " +
514
- e . PrettyPrint ( ) ) ;
515
-
516
- return CommandReturnCodes . UNHANDLED_EXCEPTION ;
517
- }
518
- } ) ;
519
-
520
- lock ( s_child_command_lock )
521
- {
522
- deploymentProjectCommand . Add ( generateDeploymentProjectCommand ) ;
523
- }
524
-
525
- return deploymentProjectCommand ;
526
- }
439
+ // // / <summary>
440
+ // // / Builds the top level command called "deployment-project" which supports the creation and saving of the
441
+ // // / CDK deployment project.
442
+ // // / </summary>
443
+ // // / <returns>An instance of the <see cref="Command"/> class</returns>
444
+ // private Command BuildDeploymentProjectCommand()
445
+ // {
446
+ // var deploymentProjectCommand = new Command("deployment-project",
447
+ // "Save the deployment project inside a user provided directory path.");
448
+ //
449
+ // var generateDeploymentProjectCommand = new Command("generate",
450
+ // "Save the deployment project inside a user provided directory path without proceeding with a deployment");
451
+ //
452
+ // lock (s_child_command_lock)
453
+ // {
454
+ // generateDeploymentProjectCommand.Add(_optionOutputDirectory);
455
+ // generateDeploymentProjectCommand.Add(_optionDiagnosticLogging);
456
+ // generateDeploymentProjectCommand.Add(_optionProjectPath);
457
+ // generateDeploymentProjectCommand.Add(_optionProjectDisplayName);
458
+ // }
459
+ //
460
+ // generateDeploymentProjectCommand.Handler = CommandHandler.Create(async (GenerateDeploymentProjectCommandHandlerInput input) =>
461
+ // {
462
+ // try
463
+ // {
464
+ // _toolInteractiveService.Diagnostics = input.Diagnostics;
465
+ // var projectDefinition = await _projectParserUtility.Parse(input.ProjectPath ?? "");
466
+ //
467
+ // var saveDirectory = input.Output;
468
+ // var projectDisplayName = input.ProjectDisplayName;
469
+ //
470
+ // OrchestratorSession session = new OrchestratorSession(projectDefinition);
471
+ //
472
+ // var targetApplicationFullPath = new DirectoryInfo(projectDefinition.ProjectPath).FullName;
473
+ //
474
+ // if (!string.IsNullOrEmpty(saveDirectory))
475
+ // {
476
+ // var targetApplicationDirectoryFullPath = new DirectoryInfo(targetApplicationFullPath).Parent!.FullName;
477
+ // saveDirectory = Path.GetFullPath(saveDirectory, targetApplicationDirectoryFullPath);
478
+ // }
479
+ //
480
+ // var generateDeploymentProject = new GenerateDeploymentProjectCommand(
481
+ // _toolInteractiveService,
482
+ // _consoleUtilities,
483
+ // _cdkProjectHandler,
484
+ // _commandLineWrapper,
485
+ // _directoryManager,
486
+ // _fileManager,
487
+ // session,
488
+ // _deploymentManifestEngine,
489
+ // _recipeHandler,
490
+ // targetApplicationFullPath);
491
+ //
492
+ // await generateDeploymentProject.ExecuteAsync(saveDirectory, projectDisplayName);
493
+ //
494
+ // return CommandReturnCodes.SUCCESS;
495
+ // }
496
+ // catch (Exception e) when (e.IsAWSDeploymentExpectedException())
497
+ // {
498
+ // if (input.Diagnostics)
499
+ // _toolInteractiveService.WriteErrorLine(e.PrettyPrint());
500
+ // else
501
+ // {
502
+ // _toolInteractiveService.WriteErrorLine(string.Empty);
503
+ // _toolInteractiveService.WriteErrorLine(e.Message);
504
+ // }
505
+ //
506
+ // // bail out with an non-zero return code.
507
+ // return CommandReturnCodes.USER_ERROR;
508
+ // }
509
+ // catch (Exception e)
510
+ // {
511
+ // // This is a bug
512
+ // _toolInteractiveService.WriteErrorLine(
513
+ // "Unhandled exception. This is a bug. Please copy the stack trace below and file a bug at https://github.com/aws/aws-dotnet-deploy. " +
514
+ // e.PrettyPrint());
515
+ //
516
+ // return CommandReturnCodes.UNHANDLED_EXCEPTION;
517
+ // }
518
+ // });
519
+ //
520
+ // lock (s_child_command_lock)
521
+ // {
522
+ // deploymentProjectCommand.Add(generateDeploymentProjectCommand);
523
+ // }
524
+ //
525
+ // return deploymentProjectCommand;
526
+ // }
527
527
528
528
private Command BuildServerModeCommand ( )
529
529
{
0 commit comments