Updating script migration to use the correct BeforeTargets. (#4680)
This commit is contained in:
parent
b354e1a3c6
commit
43dfa6b8ba
2 changed files with 4 additions and 4 deletions
|
@ -115,9 +115,9 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Rules
|
||||||
// ProjectJson Script Set Name to
|
// ProjectJson Script Set Name to
|
||||||
private static Dictionary<string, TargetHookInfo> ScriptSetToMSBuildHookTargetMap => new Dictionary<string, TargetHookInfo>()
|
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") },
|
{ "postcompile", new TargetHookInfo(false, "Build") },
|
||||||
{ "prepublish", new TargetHookInfo(true, "Publish") },
|
{ "prepublish", new TargetHookInfo(true, "PrepareForPublish") },
|
||||||
{ "postpublish", new TargetHookInfo(false, "Publish") }
|
{ "postpublish", new TargetHookInfo(false, "Publish") }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -53,8 +53,8 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData("precompile", "Build")]
|
[InlineData("precompile", "BeforeBuild")]
|
||||||
[InlineData("prepublish", "Publish")]
|
[InlineData("prepublish", "PrepareForPublish")]
|
||||||
public void Migrating_pre_scripts_populates_BeforeTargets_with_appropriate_target(string scriptName, string targetName)
|
public void Migrating_pre_scripts_populates_BeforeTargets_with_appropriate_target(string scriptName, string targetName)
|
||||||
{
|
{
|
||||||
var scriptMigrationRule = new MigrateScriptsRule();
|
var scriptMigrationRule = new MigrateScriptsRule();
|
||||||
|
|
Loading…
Reference in a new issue