| Author |
ANT: Checking results from cvs status or update
|
Mark Binau
Ranch Hand
Joined: Mar 04, 2004
Posts: 37
|
|
Hi, I am fairly new to ANT and cvs. I would like to have my ANT script check the workspace to see if it is in synch with my cvs repository before I deploy. I know how to make ANT run a cvs command such as "cvs -n -q update" to display files that are not in synch but can anyone show me how to make ANT respond differently based on the results of the cvs command? I would like it if I could just get the ANT script to stop (fail) if my workspace is not in synch with the repository. Thanks, Mark
|
 |
Mark Binau
Ranch Hand
Joined: Mar 04, 2004
Posts: 37
|
|
I was able to get this to work by having the CVS output go to a file. I then run a batch file (shell script) which sets the errorlevel so that the exec task will fail causing the script to fail. This is kinda clunky. If anyone has a better solution, please post. Thanks, Mark
|
 |
D Rog
Ranch Hand
Joined: Feb 07, 2004
Posts: 469
|
|
|
Why don't you just enforce update? If ant isn't absolute requirement then I'd offer you another building tool.
|
Get power of your iPod with MediaChest | Minimal J2EE container is here | Light weight full J2EE stack | My blog | Co-author of "Windows programming in Turbo Pascal"
|
 |
 |
|
|
subject: ANT: Checking results from cvs status or update
|
|
|