Browse Source
Merge pull request #7250 from abpframework/liangshiwei/abp-cli
Remove the redis connection string when the public website option is not specified
pull/7267/head
Yunus Emre Kalkan
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
9 additions and
2 deletions
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/RemovePublicRedisStep.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/TemplateCodeDeleteStep.cs
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using System.Linq; |
|
|
|
using System; |
|
|
|
using System.Linq; |
|
|
|
using Volo.Abp.Cli.ProjectBuilding.Files; |
|
|
|
|
|
|
|
namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps |
|
|
|
@ -12,6 +13,12 @@ namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps |
|
|
|
context.Files.FirstOrDefault(f => f.Name.EndsWith("MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj"))?.RemoveTemplateCodeIfNot("PUBLIC-REDIS"); |
|
|
|
context.Files.FirstOrDefault(f => f.Name.EndsWith("MyCompanyName.MyProjectName.HttpApi.Host.csproj"))?.RemoveTemplateCodeIfNot("PUBLIC-REDIS"); |
|
|
|
context.Files.FirstOrDefault(f => f.Name.EndsWith("MyProjectNameHttpApiHostModule.cs"))?.RemoveTemplateCodeIfNot("PUBLIC-REDIS"); |
|
|
|
|
|
|
|
var appSettingsFiles = context.Files.Where(f => f.Name.EndsWith("appSettings.json", StringComparison.InvariantCultureIgnoreCase)).ToList(); |
|
|
|
foreach (var appSettings in appSettingsFiles) |
|
|
|
{ |
|
|
|
appSettings.RemoveTemplateCodeIfNot("PUBLIC-REDIS"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -8,7 +8,7 @@ namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps |
|
|
|
{ |
|
|
|
foreach (var file in context.Files) |
|
|
|
{ |
|
|
|
if (file.Name.EndsWith(".cs") || file.Name.EndsWith(".csproj") || file.Name.EndsWith(".cshtml")) |
|
|
|
if (file.Name.EndsWith(".cs") || file.Name.EndsWith(".csproj") || file.Name.EndsWith(".cshtml") || file.Name.EndsWith(".json")) |
|
|
|
{ |
|
|
|
file.RemoveTemplateCode(); |
|
|
|
file.RemoveTemplateCodeMarkers(); |
|
|
|
|