JeremySkinner/Phantom — pull request #21 by kenegozi (2012-06-15 06:51:48+00:00)
Title: script cleanup support (newlines now amended)

allow scripts to perform cleanup tasks even if a target has failed

e.g. shut down services (like a profiler, DB, http server) etc.

allow multiple cleanup calls
1. for the sake of includes - each could add its own cleanup
2. easier to have cleanup tasks not depend on each other - thus if one fail the others still run

It was a must on a project Im working on now, with a complex build setup
our way around it for now is to have a global failed=false var, and all targets try-except to set it to true, and check it at the begin to bypass (except for a target named cleanup that never bypass).