Updating script migration to use the correct BeforeTargets. (#4680)

This commit is contained in:
Livar 2016-11-10 18:24:35 -08:00 committed by Piotr Puszkiewicz
parent b354e1a3c6
commit 43dfa6b8ba
2 changed files with 4 additions and 4 deletions

View file

@ -115,9 +115,9 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Rules
// 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") }
};

View file

@ -53,8 +53,8 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
}
[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();