Skip to content

Commit

Permalink
Merge pull request #18654 from abpframework/EngincanV/patch-1
Browse files Browse the repository at this point in the history
CLI: Fix build error in the project creation command base.
  • Loading branch information
skoc10 authored Jan 2, 2024
2 parents ea7200f + b9ab33f commit 5332093
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
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;

Expand All @@ -44,7 +45,8 @@ public NewCommand(
IBundlingService bundlingService,
ITemplateInfoProvider templateInfoProvider,
TemplateProjectBuilder templateProjectBuilder,
AngularThemeConfigurer angularThemeConfigurer) :
AngularThemeConfigurer angularThemeConfigurer,
CliVersionService cliVersionService) :
base(connectionStringProvider,
solutionPackageVersionFinder,
cmdHelper,
Expand All @@ -55,7 +57,8 @@ public NewCommand(
themePackageAdder,
eventBus,
bundlingService,
angularThemeConfigurer)
angularThemeConfigurer,
cliVersionService)
{
TemplateInfoProvider = templateInfoProvider;
TemplateProjectBuilder = templateProjectBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
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;
Expand All @@ -42,6 +43,8 @@ public abstract class ProjectCreationCommandBase
public ThemePackageAdder ThemePackageAdder { get; }

public AngularThemeConfigurer AngularThemeConfigurer { get; }

public CliVersionService CliVersionService { get; }

public ProjectCreationCommandBase(
ConnectionStringProvider connectionStringProvider,
Expand All @@ -54,7 +57,8 @@ public ProjectCreationCommandBase(
ThemePackageAdder themePackageAdder,
ILocalEventBus eventBus,
IBundlingService bundlingService,
AngularThemeConfigurer angularThemeConfigurer)
AngularThemeConfigurer angularThemeConfigurer,
CliVersionService cliVersionService)
{
_bundlingService = bundlingService;
ConnectionStringProvider = connectionStringProvider;
Expand All @@ -67,6 +71,7 @@ public ProjectCreationCommandBase(
EventBus = eventBus;
ThemePackageAdder = themePackageAdder;
AngularThemeConfigurer = angularThemeConfigurer;
CliVersionService = cliVersionService;

Logger = NullLogger<NewCommand>.Instance;
}
Expand All @@ -86,7 +91,7 @@ protected async Task<ProjectBuildArgs> GetProjectBuildArgsAsync(CommandLineArgs
Logger.LogInformation("Preview: yes");

#if !DEBUG
var cliVersion = await CliService.GetCurrentCliVersionAsync(typeof(CliService).Assembly);
var cliVersion = await CliVersionService.GetCurrentCliVersionAsync();

if (!cliVersion.IsPrerelease)
{
Expand Down

0 comments on commit 5332093

Please sign in to comment.