nant 构建失败后进行清理
我正在寻找我的 nant 构建脚本,以便在构建出错时能够自行清理。我正在寻找类似于以下执行的内容:
Target= Software.Build
Target= Software.Build.Success *(depends on Software.Build succeeding)*
Target= Software.Build.Failed
我正在寻找一种解决方案,如果 Software.Build 目标失败,则将执行 Software.Build.Failed 例如,向某人发送电子邮件,告知构建以某种方式失败,否则软件.Build.Success 将运行以允许构建脚本继续。
这对南特来说可能吗?如果是这样,有人能给我指出合适的文章/解决方案吗?
I'm looking for my nant build script to be able to clean up after itself if a build goes wrong. I'm looking for something resembling the following execution:
Target= Software.Build
Target= Software.Build.Success *(depends on Software.Build succeeding)*
Target= Software.Build.Failed
I am looking for a solution that if the Software.Build target fails then Software.Build.Failed will be executed e.g. to e-mail someone that the build failed in some way, otherwise Software.Build.Success will be run to allow the build script to continue.
Is this even possible with nant? If so, could anyone point me to a suitable article/solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
或者,如果您有全局数据需要清理,则可以使用 NAnt OnFailure 事件。
Or if you have global data to be cleaned up, you can use the NAnt OnFailure event.
NAntContrib 有一个
trycatch
任务:NAntContrib has a
trycatch
task: