Browse Source

Fix mistaken merge conflict merge

pull/13150/head
enisn 4 years ago
parent
commit
ae71fd269f
  1. 33
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs

33
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs

@ -44,7 +44,7 @@ public abstract class ProjectCreationCommandBase
AngularPwaSupportAdder angularPwaSupportAdder, AngularPwaSupportAdder angularPwaSupportAdder,
InitialMigrationCreator initialMigrationCreator, InitialMigrationCreator initialMigrationCreator,
ThemePackageAdder themePackageAdder, ThemePackageAdder themePackageAdder,
ILocalEventBus eventBus) ILocalEventBus eventBus)
{ {
ConnectionStringProvider = connectionStringProvider; ConnectionStringProvider = connectionStringProvider;
SolutionPackageVersionFinder = solutionPackageVersionFinder; SolutionPackageVersionFinder = solutionPackageVersionFinder;
@ -170,7 +170,7 @@ public abstract class ProjectCreationCommandBase
outputFolderRoot = slnPath; outputFolderRoot = slnPath;
slnPath = Directory.GetFiles(outputFolderRoot, "*.sln").FirstOrDefault(); slnPath = Directory.GetFiles(outputFolderRoot, "*.sln").FirstOrDefault();
} }
if (slnPath == null) if (slnPath == null)
{ {
throw new CliUsageException($"This command should be run inside a folder that contains a microservice solution! Or use -{Options.MainSolution.Short} parameter."); throw new CliUsageException($"This command should be run inside a folder that contains a microservice solution! Or use -{Options.MainSolution.Short} parameter.");
@ -227,10 +227,11 @@ public abstract class ProjectCreationCommandBase
protected void ExtractProjectZip(ProjectBuildResult project, string outputFolder) protected void ExtractProjectZip(ProjectBuildResult project, string outputFolder)
{ {
EventBus.PublishAsync(new ProjectCreationProgressEvent { EventBus.PublishAsync(new ProjectCreationProgressEvent
{
Message = "Extracting the solution archieve" Message = "Extracting the solution archieve"
}, false); }, false);
using (var templateFileStream = new MemoryStream(project.ZipContent)) using (var templateFileStream = new MemoryStream(project.ZipContent))
{ {
using (var zipInputStream = new ZipInputStream(templateFileStream)) using (var zipInputStream = new ZipInputStream(templateFileStream))
@ -366,10 +367,11 @@ public abstract class ProjectCreationCommandBase
{ {
if (MicroserviceServiceTemplateBase.IsMicroserviceServiceTemplate(projectArgs.TemplateName)) if (MicroserviceServiceTemplateBase.IsMicroserviceServiceTemplate(projectArgs.TemplateName))
{ {
await EventBus.PublishAsync(new ProjectCreationProgressEvent { await EventBus.PublishAsync(new ProjectCreationProgressEvent
{
Message = "Building the microservice solution" Message = "Building the microservice solution"
}, false); }, false);
CmdHelper.RunCmd("dotnet build /graphbuild", projectArgs.OutputFolder); CmdHelper.RunCmd("dotnet build /graphbuild", projectArgs.OutputFolder);
} }
} }
@ -382,11 +384,12 @@ public abstract class ProjectCreationCommandBase
MicroserviceServiceTemplateBase.IsMicroserviceTemplate(projectArgs.TemplateName)) MicroserviceServiceTemplateBase.IsMicroserviceTemplate(projectArgs.TemplateName))
{ {
Logger.LogInformation("Installing client-side packages..."); Logger.LogInformation("Installing client-side packages...");
await EventBus.PublishAsync(new ProjectCreationProgressEvent { await EventBus.PublishAsync(new ProjectCreationProgressEvent
{
Message = "Installing client-side packages" Message = "Installing client-side packages"
}, false); }, false);
await InstallLibsService.InstallLibsAsync(projectArgs.OutputFolder); await InstallLibsService.InstallLibsAsync(projectArgs.OutputFolder);
} }
} }
@ -423,10 +426,11 @@ public abstract class ProjectCreationCommandBase
return; return;
} }
await EventBus.PublishAsync(new ProjectCreationProgressEvent { await EventBus.PublishAsync(new ProjectCreationProgressEvent
{
Message = "Creating the initial DB migration" Message = "Creating the initial DB migration"
}, false); }, false);
await InitialMigrationCreator.CreateAsync(Path.GetDirectoryName(efCoreProjectPath), isLayeredTemplate); await InitialMigrationCreator.CreateAsync(Path.GetDirectoryName(efCoreProjectPath), isLayeredTemplate);
} }
@ -438,7 +442,7 @@ public abstract class ProjectCreationCommandBase
if (isAngular && isPwa) if (isAngular && isPwa)
{ {
Logger.LogInformation("Adding PWA Support to Angular app."); Logger.LogInformation("Adding PWA Support to Angular app.");
AngularPwaSupportAdder.AddPwaSupport(projectArgs.OutputFolder); AngularPwaSupportAdder.AddPwaSupport(projectArgs.OutputFolder);
} }
} }
@ -659,10 +663,11 @@ public abstract class ProjectCreationCommandBase
{ {
public const string Short = "ms"; public const string Short = "ms";
public const string Long = "main-solution"; public const string Long = "main-solution";
}
public static class Theme public static class Theme
{ {
public const string Long = "theme"; public const string Long = "theme";
} }
} }
} }
Loading…
Cancel
Save