Browse Source

Update ABP CLI

pull/20891/head
EngincanV 2 years ago
parent
commit
6a9a588628
  1. 1
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs
  2. 8
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs

1
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs

@ -220,6 +220,7 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien
sb.AppendLine(" abp new Acme.BookStore -u angular -d mongodb"); sb.AppendLine(" abp new Acme.BookStore -u angular -d mongodb");
sb.AppendLine(" abp new Acme.BookStore -m none"); sb.AppendLine(" abp new Acme.BookStore -m none");
sb.AppendLine(" abp new Acme.BookStore -m react-native"); sb.AppendLine(" abp new Acme.BookStore -m react-native");
sb.AppendLine(" abp new Acme.BookStore -m maui");
sb.AppendLine(" abp new Acme.BookStore -d mongodb"); sb.AppendLine(" abp new Acme.BookStore -d mongodb");
sb.AppendLine(" abp new Acme.BookStore -d mongodb -o d:\\my-project"); sb.AppendLine(" abp new Acme.BookStore -d mongodb -o d:\\my-project");
sb.AppendLine(" abp new Acme.BookStore -t module"); sb.AppendLine(" abp new Acme.BookStore -t module");

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

@ -137,7 +137,7 @@ public abstract class ProjectCreationCommandBase
Logger.LogInformation("Public Web Site: yes"); Logger.LogInformation("Public Web Site: yes");
} }
var mobileApp = GetMobilePreference(commandLineArgs); var mobileApp = GetMobilePreference(commandLineArgs, template);
if (mobileApp != MobileApp.None) if (mobileApp != MobileApp.None)
{ {
Logger.LogInformation("Mobile App: " + mobileApp); Logger.LogInformation("Mobile App: " + mobileApp);
@ -635,7 +635,7 @@ public abstract class ProjectCreationCommandBase
} }
} }
protected virtual MobileApp GetMobilePreference(CommandLineArgs commandLineArgs) protected virtual MobileApp GetMobilePreference(CommandLineArgs commandLineArgs, string template)
{ {
var optionValue = commandLineArgs.Options.GetOrNull(Options.Mobile.Short, Options.Mobile.Long); var optionValue = commandLineArgs.Options.GetOrNull(Options.Mobile.Short, Options.Mobile.Long);
@ -644,9 +644,9 @@ public abstract class ProjectCreationCommandBase
case null: case null:
case "none": case "none":
return MobileApp.None; return MobileApp.None;
case "react-native": case "react-native" when template is AppProTemplate.TemplateName or MicroserviceProTemplate.TemplateName:
return MobileApp.ReactNative; return MobileApp.ReactNative;
case "maui": case "maui" when template is AppProTemplate.TemplateName or MicroserviceProTemplate.TemplateName:
return MobileApp.Maui; return MobileApp.Maui;
default: default:
throw new CliUsageException(ExceptionMessageHelper.GetInvalidOptionExceptionMessage("Mobile App")); throw new CliUsageException(ExceptionMessageHelper.GetInvalidOptionExceptionMessage("Mobile App"));

Loading…
Cancel
Save