public override void CommandAction()

in src/Dimmy.Sitecore.Plugin/Versions/10.1.0/Project/SubCommands/DeployDevelopmentHelper.cs [50:92]


        public override void CommandAction(DeployDevelopmentHelperArgument arg)
        {
            if (string.IsNullOrEmpty(arg.WorkingPath))
                arg.WorkingPath = Path.GetFullPath(Environment.CurrentDirectory);
            
            var runningProject = _projectService.ResolveRunningProject(arg);
            
            var cd = runningProject.Services.Single(r => r.Name == "cd");
            var cm = runningProject.Services.Single(r => r.Name == "cm");
            
            var copyFiles = new[]
            {
                new CopyFile
                {
                    TargetFilePath = $"{TemplatePath}\\Dimmy.DevelopmentHelper._10._1._0.dll",
                    DestinationFolder = "C:\\inetpub\\wwwroot\\bin"
                },
                new CopyFile
                {
                    TargetFilePath = $"{TemplatePath}\\Dimmy.DevelopmentHelper._10._1._0.SetFullAccess.ps1",
                    DestinationFolder = "C:\\"
                },
            };
            
            _copyFileToContainerPipeline.Execute(new CopyFileToContainerContext
            {
                WorkingPath = runningProject.WorkingPath,
                CopyFiles = copyFiles,
                ContainerId = cd.ContainerId
            });
            
            _copyFileToContainerPipeline.Execute(new CopyFileToContainerContext
            {
                WorkingPath = runningProject.WorkingPath,
                CopyFiles = copyFiles,
                ContainerId = cm.ContainerId
            });
            
            _dockerService
                 .RunPowershellInContainer(cd.ContainerId,"C:\\Dimmy.DevelopmentHelper._10._1._0.SetFullAccess.ps1");
            _dockerService
                .RunPowershellInContainer(cm.ContainerId,"C:\\Dimmy.DevelopmentHelper._10._1._0.SetFullAccess.ps1");
        }