Bas Bossink
Bas Bossink

Reputation: 9678

Run commands on failing build

Is there a way to implement a conceptual finally clause in a FAKE script, or to formulate it differently is there an alternative to RunTargetOrDefault that allows one to specify a Target that should be run when a build fails.

Upvotes: 0

Views: 67

Answers (1)

Fyodor Soikin
Fyodor Soikin

Reputation: 80744

FAKE provides a way to register a target that will run on failed build, via the BuildFailureTarget constructor.

BuildFailureTarget "ShootMyself" <| fun _ -> ShotgunHelper.Shoot (left foot)

See documentation for more info.

Upvotes: 2

Related Questions