Browse Source

CLI: Fix build error in the project creation command base.

pull/18654/head
Engincan VESKE 2 years ago
parent
commit
b9ab33fc3b
  1. 7
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs
  2. 9
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs

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

@ -19,6 +19,7 @@ using Volo.Abp.Cli.ProjectBuilding.Events;
using Volo.Abp.Cli.ProjectBuilding.Templates.App;
using Volo.Abp.Cli.ProjectModification;
using Volo.Abp.Cli.Utils;
using Volo.Abp.Cli.Version;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus.Local;
@ -44,7 +45,8 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien
IBundlingService bundlingService,
ITemplateInfoProvider templateInfoProvider,
TemplateProjectBuilder templateProjectBuilder,
AngularThemeConfigurer angularThemeConfigurer) :
AngularThemeConfigurer angularThemeConfigurer,
CliVersionService cliVersionService) :
base(connectionStringProvider,
solutionPackageVersionFinder,
cmdHelper,
@ -55,7 +57,8 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien
themePackageAdder,
eventBus,
bundlingService,
angularThemeConfigurer)
angularThemeConfigurer,
cliVersionService)
{
TemplateInfoProvider = templateInfoProvider;
TemplateProjectBuilder = templateProjectBuilder;

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

@ -22,6 +22,7 @@ using Volo.Abp.Cli.ProjectBuilding.Templates.Microservice;
using Volo.Abp.Cli.ProjectBuilding.Templates.Module;
using Volo.Abp.Cli.ProjectBuilding.Templates.MvcModule;
using Volo.Abp.Cli.Utils;
using Volo.Abp.Cli.Version;
using Volo.Abp.EventBus.Local;
namespace Volo.Abp.Cli.Commands;
@ -42,6 +43,8 @@ public abstract class ProjectCreationCommandBase
public ThemePackageAdder ThemePackageAdder { get; }
public AngularThemeConfigurer AngularThemeConfigurer { get; }
public CliVersionService CliVersionService { get; }
public ProjectCreationCommandBase(
ConnectionStringProvider connectionStringProvider,
@ -54,7 +57,8 @@ public abstract class ProjectCreationCommandBase
ThemePackageAdder themePackageAdder,
ILocalEventBus eventBus,
IBundlingService bundlingService,
AngularThemeConfigurer angularThemeConfigurer)
AngularThemeConfigurer angularThemeConfigurer,
CliVersionService cliVersionService)
{
_bundlingService = bundlingService;
ConnectionStringProvider = connectionStringProvider;
@ -67,6 +71,7 @@ public abstract class ProjectCreationCommandBase
EventBus = eventBus;
ThemePackageAdder = themePackageAdder;
AngularThemeConfigurer = angularThemeConfigurer;
CliVersionService = cliVersionService;
Logger = NullLogger<NewCommand>.Instance;
}
@ -86,7 +91,7 @@ public abstract class ProjectCreationCommandBase
Logger.LogInformation("Preview: yes");
#if !DEBUG
var cliVersion = await CliService.GetCurrentCliVersionAsync(typeof(CliService).Assembly);
var cliVersion = await CliVersionService.GetCurrentCliVersionAsync();
if (!cliVersion.IsPrerelease)
{

Loading…
Cancel
Save