Skip to content

Commit

Permalink
[change] 调整LocalFileSaver中获取cleanUpOutputDir参数的FamilyName,允许单独指定CodeT…
Browse files Browse the repository at this point in the history
…arget或DataTarget是否清除输出目录
  • Loading branch information
pirunxi committed Sep 9, 2023
1 parent bce68f8 commit 81ee398
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Luban.Core/BuiltinOptionNames.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public static class BuiltinOptionNames

public const string OutputSaver = "outputSaver";

public const string CleanUpOutputDir = "cleanUpOutputDir";

public const string SchemaCollectorFamily = "schemaCollector";

public const string L10NFamily = "l10n";
Expand Down
2 changes: 1 addition & 1 deletion src/Luban.Core/OutputSaver/LocalFileSaver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class LocalFileSaver : OutputSaverBase

protected override void BeforeSave(OutputFileManifest outputFileManifest, string outputDir)
{
if (!EnvManager.Current.GetBoolOptionOrDefault($"{BuiltinOptionNames.OutputSaver}.local", "cleanUpOutputDir",
if (!EnvManager.Current.GetBoolOptionOrDefault($"{BuiltinOptionNames.OutputSaver}.{outputFileManifest.TargetName}", BuiltinOptionNames.CleanUpOutputDir,
true, true))
{
return;
Expand Down

0 comments on commit 81ee398

Please sign in to comment.