Flex compilation using mxmlc in a for loop in a windows batch script
Basically, what I have tried to do is using a Jenkins job to run on a windows machine, run over a few modules folders, get the mxml files under them and compile using mxmlc (flex compiler).
It worked very well but there was a problem when I have tried to catch the exit code of the compilation status.
The errorlevel parameter will have the correct value only outside of the for loop. Inside the for loop it'll always be equal to zero. This will not help me because in the end of the loop, it'll only hold the exit code of the last iteration.
To solve this I did the following:
The above syntax disables the global parameters and makes them local. That way, the ERROLEVEL with the '!' in the beginning and end of it will have the right value in each iteration and therefore will fail if one of the compilations fails.