|
#1
|
|||
|
|||
Parent - Child Conditional Step Ignored
I am trying to setup a conditional step that checks for the existence of a folder and if true, it skips all of the child steps. Current execution evaluates the conditional rule just fine but it executes the child anyway.
Here is the conditional step: <step action='Group' type='0'> <condcomparison type='3'>6</condcomparison> <condexpr>[NOT vbld_FSO.FolderExists("%fiservcbspath%\%appname1%\ %appversion1%\%instname%\CommunicatorErrors")] </condexpr> <description>Check for existence of CommunicatorErrors folder and create if doesn't exist</description> <indent type='3'>1</indent> <name>Create Error Folders</name> </step> This is the child: <step action='Run Program' type='0'> <command>%doscmd% md %fiservcbspath%\%appname1%\%appversion1%\%instname %\CommunicatorErrors</command> <condexpr>[NOT vbld_FSO.FolderExists("%fiservcbspath%\%appname1%\ %appversion1%\%instname%\CommunicatorErrors")] </condexpr> <indent type='3'>2</indent> <name>CommunicatorErrors</name> <outputfrom type='3'>1</outputfrom> </step> Thank you! |
#2
|
|||
|
|||
Do you have 'Tools | Application Options | General | Implement nesting of conditional build rules' unchecked? If so, it needs to be checked (the default) for build rules to apply to child steps.
Here is a similar test that works as expected here. The first build has this result: 8/12/2004 10:47:40 AM: --------------------Starting Build: 'exists.bld'-------------------- 8/12/2004 10:47:41 AM: Building project step 'Check for folder'... 8/12/2004 10:47:41 AM: Building project step 'make dir'... 8/12/2004 10:47:41 AM: Building project step 'msg'... Building... 8/12/2004 10:47:41 AM: Build successfully completed. Rebuilding the project has this result: 8/12/2004 10:47:46 AM: --------------------Starting Build: 'exists.bld'-------------------- 8/12/2004 10:47:46 AM: Building project step 'Check for folder'... 8/12/2004 10:47:46 AM: Step skipped 8/12/2004 10:47:46 AM: Building project step 'make dir'... 8/12/2004 10:47:46 AM: Step skipped 8/12/2004 10:47:46 AM: Building project step 'msg'... 8/12/2004 10:47:46 AM: Step skipped 8/12/2004 10:47:46 AM: Build successfully completed. Compare this with what you're doing and see what's different. Also be aware that using Rebuild Selected/Test ignores build rules: http://www.kinook.com/Forum/showthread.php?threadid=240 |
#3
|
|||
|
|||
The option is checked "Implement nesting of conditional build rules". The result of running the steps is as follows:
Building project step 'Folder Structure'... Building project step 'Create Error Folders'... Building project step 'CommunicatorErrors'... A subdirectory or file C:\FiservCBS\Communicator\420\INTG01\CommunicatorE rrors already exists. Process completed with exit code 1 Step 'CommunicatorErrors' failed Build ended. Is there any issue here with the way that the steps are executed? Does the "rebuild selected" have any issues? |
#4
|
|||
|
|||
Also be aware that using Rebuild Selected/Test ignores build rules: http://www.kinook.com/Forum/showthread.php?threadid=240
|
|
|