Skip to content

Commit

Permalink
Revert "fix(execution): exclusion of invoked targets from skipping"
Browse files Browse the repository at this point in the history
This reverts commit 422b344.
  • Loading branch information
matkoch committed Jan 18, 2024
1 parent 985de83 commit 516a48c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 25 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added `DOTNET_NOLOGO` to bootstrapping files
- Fixed `BinaryFormatterSerialization` warning by suppression
- Fixed .NET SDK discovery in bootstrapping files
- Fixed exclusion of invoked targets from skipping
- Fixed quotation for bootstrapping script invocation
- Fixed filtering on `FileAttributes`
- Fixed quoting in `AppVeyor` generation
Expand Down
25 changes: 2 additions & 23 deletions source/Nuke.Build.Tests/BuildExecutorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public void TestParameterSkipped_AllWithInvoked()
{
C.Invoked = true;
ExecuteBuild(skippedTargets: new ExecutableTarget[0]);
AssertSucceeded();
AssertSkipped(A, B, C);
AssertSucceeded(C);
AssertSkipped(A, B);
}

[Fact]
Expand Down Expand Up @@ -108,27 +108,6 @@ public void TestStaticCondition_DependencyBehavior_Skip()
B.OnlyWhen.Should().Be("false");
}

[Fact]
public void TestStaticCondition_Invoked_DependencyBehavior_Skip()
{
C.StaticConditions.Add(("() => false", () => false));
C.DependencyBehavior = DependencyBehavior.Skip;
C.Invoked = true;
ExecuteBuild();
AssertSkipped(A, B, C);
}

[Fact]
public void TestStaticCondition_Invoked_DependencyBehavior_Execute()
{
C.StaticConditions.Add(("() => false", () => false));
C.DependencyBehavior = DependencyBehavior.Execute;
C.Invoked = true;
ExecuteBuild();
AssertSkipped(C);
AssertSucceeded(A, B);
}

[Fact]
public void TestStaticCondition_Multiple()
{
Expand Down
2 changes: 1 addition & 1 deletion source/Nuke.Build/Execution/BuildExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ string Format(string condition)

private static void MarkTargetSkipped(INukeBuild build, ExecutableTarget target, string reason = null)
{
if (target.Status != ExecutionStatus.Scheduled)
if (target.Invoked || target.Status != ExecutionStatus.Scheduled)
return;

target.Status = ExecutionStatus.Skipped;
Expand Down

0 comments on commit 516a48c

Please sign in to comment.