Browse Source
Merge pull request #8395 from abpframework/cli-cms-kit-version-control
Cli: Check if CmsKit supported for target version
pull/8396/head
maliming
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
14 additions and
1 deletions
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplateBase.cs
|
|
|
@ -169,12 +169,25 @@ namespace Volo.Abp.Cli.ProjectBuilding.Templates.App |
|
|
|
steps.Add(new ChangePublicAuthPortStep()); |
|
|
|
} |
|
|
|
|
|
|
|
if (!context.BuildArgs.ExtraProperties.ContainsKey("without-cms-kit")) |
|
|
|
if (!context.BuildArgs.ExtraProperties.ContainsKey("without-cms-kit") && IsCmsKitSupportedForTargetVersion(context)) |
|
|
|
{ |
|
|
|
context.Symbols.Add("CMS-KIT"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private bool IsCmsKitSupportedForTargetVersion(ProjectBuildContext context) |
|
|
|
{ |
|
|
|
if (string.IsNullOrWhiteSpace(context.BuildArgs.Version)) |
|
|
|
{ |
|
|
|
// We'll return true after 4.3.0 stable release. see https://github.com/abpframework/abp/issues/8394
|
|
|
|
// return true;
|
|
|
|
|
|
|
|
return context.BuildArgs.ExtraProperties.ContainsKey(NewCommand.Options.Preview.Long); |
|
|
|
} |
|
|
|
|
|
|
|
return SemanticVersion.Parse(context.BuildArgs.Version) > SemanticVersion.Parse("4.2.9"); |
|
|
|
} |
|
|
|
|
|
|
|
private static void ConfigureWithoutUi(ProjectBuildContext context, List<ProjectBuildPipelineStep> steps) |
|
|
|
{ |
|
|
|
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Web")); |
|
|
|
|