Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Updating script migration to use the correct BeforeTargets. #4680

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ private void AddExec(ProjectTargetElement target, string command)
// ProjectJson Script Set Name to
private static Dictionary<string, TargetHookInfo> ScriptSetToMSBuildHookTargetMap => new Dictionary<string, TargetHookInfo>()
{
{ "precompile", new TargetHookInfo(true, "Build") },
{ "precompile", new TargetHookInfo(true, "BeforeBuild") },
{ "postcompile", new TargetHookInfo(false, "Build") },
{ "prepublish", new TargetHookInfo(true, "Publish") },
{ "prepublish", new TargetHookInfo(true, "PrepareForPublish") },
{ "postpublish", new TargetHookInfo(false, "Publish") }
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public void Formatting_script_commands_throws_when_variable_is_unsupported(strin
}

[Theory]
[InlineData("precompile", "Build")]
[InlineData("prepublish", "Publish")]
[InlineData("precompile", "BeforeBuild")]
[InlineData("prepublish", "PrepareForPublish")]
public void Migrating_pre_scripts_populates_BeforeTargets_with_appropriate_target(string scriptName, string targetName)
{
var scriptMigrationRule = new MigrateScriptsRule();
Expand Down