Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading