开发者

Is there a way to make NAnt catch exceptions and run a roll back script?

开发者 https://www.devze.com 2023-04-06 06:15 出处:网络
I am using NAnt to run some scrips for a deployment. It has simplified the process a lot. The issue now is that when there is an error I want the N开发者_JS百科Ant task to run my roll back scripts. Ho

I am using NAnt to run some scrips for a deployment. It has simplified the process a lot. The issue now is that when there is an error I want the N开发者_JS百科Ant task to run my roll back scripts. However I only know of the option to fail on error for my tasks. Is there any sort of baked in way to set properties on error or to use the the chose statement to redirect the flow of the tasks if a previous task fails?


I found the answer looking for another question about NAnt (error handling in nant build scripts). This will fill the need I have to automatically kick off roll back scripts. Only thing catch is that is not a part of base NAnt but NAntContrib, but that a minor detail.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号