|
|
@ -40,18 +40,29 @@ namespace Volo.Abp.Cli.Commands |
|
|
Logger.LogInformation("Creating your project..."); |
|
|
Logger.LogInformation("Creating your project..."); |
|
|
Logger.LogInformation("Project name: " + commandLineArgs.Target); |
|
|
Logger.LogInformation("Project name: " + commandLineArgs.Target); |
|
|
|
|
|
|
|
|
commandLineArgs.Options.Add(CliConsts.Command, commandLineArgs.Command); |
|
|
var template = commandLineArgs.Options.GetOrNull(Options.Template.Short, Options.Template.Long); |
|
|
|
|
|
if (template != null) |
|
|
|
|
|
{ |
|
|
|
|
|
Logger.LogInformation("Template: " + template); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var result = await ProjectBuilder.BuildAsync( |
|
|
var version = commandLineArgs.Options.GetOrNull(Options.Version.Short, Options.Version.Long); |
|
|
new ProjectBuildArgs( |
|
|
if (version != null) |
|
|
SolutionName.Parse(commandLineArgs.Target), |
|
|
{ |
|
|
commandLineArgs.Options.GetOrNull(Options.Template.Short, Options.Template.Long), |
|
|
Logger.LogInformation("Version: " + version); |
|
|
commandLineArgs.Options.GetOrNull(Options.Version.Short, Options.Version.Long), |
|
|
} |
|
|
GetDatabaseProvider(commandLineArgs), |
|
|
|
|
|
GetUiFramework(commandLineArgs), |
|
|
var databaseProvider = GetDatabaseProvider(commandLineArgs); |
|
|
commandLineArgs.Options |
|
|
if (databaseProvider != DatabaseProvider.NotSpecified) |
|
|
) |
|
|
{ |
|
|
); |
|
|
Logger.LogInformation("Database provider: " + databaseProvider); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var uiFramework = GetUiFramework(commandLineArgs); |
|
|
|
|
|
if (uiFramework != UiFramework.NotSpecified) |
|
|
|
|
|
{ |
|
|
|
|
|
Logger.LogInformation("UI Framework: " + uiFramework); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var outputFolder = commandLineArgs.Options.GetOrNull(Options.OutputFolder.Short, Options.OutputFolder.Long); |
|
|
var outputFolder = commandLineArgs.Options.GetOrNull(Options.OutputFolder.Short, Options.OutputFolder.Long); |
|
|
if (outputFolder != null) |
|
|
if (outputFolder != null) |
|
|
@ -68,6 +79,21 @@ namespace Volo.Abp.Cli.Commands |
|
|
outputFolder = Directory.GetCurrentDirectory(); |
|
|
outputFolder = Directory.GetCurrentDirectory(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Logger.LogInformation("Output folder: " + outputFolder); |
|
|
|
|
|
|
|
|
|
|
|
commandLineArgs.Options.Add(CliConsts.Command, commandLineArgs.Command); |
|
|
|
|
|
|
|
|
|
|
|
var result = await ProjectBuilder.BuildAsync( |
|
|
|
|
|
new ProjectBuildArgs( |
|
|
|
|
|
SolutionName.Parse(commandLineArgs.Target), |
|
|
|
|
|
template, |
|
|
|
|
|
version, |
|
|
|
|
|
databaseProvider, |
|
|
|
|
|
uiFramework, |
|
|
|
|
|
commandLineArgs.Options |
|
|
|
|
|
) |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
using (var templateFileStream = new MemoryStream(result.ZipContent)) |
|
|
using (var templateFileStream = new MemoryStream(result.ZipContent)) |
|
|
{ |
|
|
{ |
|
|
using (var zipInputStream = new ZipInputStream(templateFileStream)) |
|
|
using (var zipInputStream = new ZipInputStream(templateFileStream)) |
|
|
@ -101,8 +127,7 @@ namespace Volo.Abp.Cli.Commands |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Logger.LogInformation($"Successfully created the project '{commandLineArgs.Target}'"); |
|
|
Logger.LogInformation($"'{commandLineArgs.Target}' has been successfully created to '{outputFolder}'"); |
|
|
Logger.LogInformation($"The output folder is: '{outputFolder}'"); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public string GetUsageInfo() |
|
|
public string GetUsageInfo() |
|
|
|