Browse Source
Merge pull request #12323 from abpframework/volo-Issue/9681
Cli: Add license code to module source code downloads
pull/12328/head
albert
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
22 additions and
1 deletions
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/ModuleProjectBuildPipelineBuilder.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/CreateAppSettingsSecretsStep.cs
|
|
|
@ -14,6 +14,13 @@ public static class ModuleProjectBuildPipelineBuilder |
|
|
|
pipeline.Steps.Add(new ReplaceCommonPropsStep()); |
|
|
|
pipeline.Steps.Add(new MakeProxyJsonFileEmbeddedStep()); |
|
|
|
pipeline.Steps.Add(new ReplaceConfigureAwaitPropsStep()); |
|
|
|
|
|
|
|
if (context.Module.IsPro) |
|
|
|
{ |
|
|
|
pipeline.Steps.Add(new CreateAppSettingsSecretsStep()); |
|
|
|
pipeline.Steps.Add(new LicenseCodeReplaceStep()); |
|
|
|
} |
|
|
|
|
|
|
|
pipeline.Steps.Add(new UpdateNuGetConfigStep("/NuGet.Config")); |
|
|
|
pipeline.Steps.Add(new CreateProjectResultZipStep()); |
|
|
|
|
|
|
|
|
|
|
|
@ -40,7 +40,21 @@ public class CreateAppSettingsSecretsStep : ProjectBuildPipelineStep |
|
|
|
|
|
|
|
private static byte[] GetAppSettingsSecretJsonContent(ProjectBuildContext context) |
|
|
|
{ |
|
|
|
return context.Template.IsPro() |
|
|
|
bool condition; |
|
|
|
if (context.Template != null) |
|
|
|
{ |
|
|
|
condition = context.Template.IsPro(); |
|
|
|
} |
|
|
|
else if (context.Module != null) |
|
|
|
{ |
|
|
|
condition = context.Module.IsPro; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
condition = false; |
|
|
|
} |
|
|
|
|
|
|
|
return condition |
|
|
|
? $"{{{Environment.NewLine} \"AbpLicenseCode\": \"{CliConsts.LicenseCodePlaceHolder}\" {Environment.NewLine}}}".GetBytes() |
|
|
|
: $"{{{Environment.NewLine}}}".GetBytes(); |
|
|
|
} |
|
|
|
|