Jerome Renard <jero...@apache.org> wrote on 14/04/2011 11:11:

Gaetano,

On Thu, Apr 14, 2011 at 9:40 AM, Gaetano Giunta
<giunta.gaet...@gmail.com>  wrote:
Jerome Renard wrote:
[...]

As you will see it is quite simple et much more readable that its Ant
equivalent.

Glad we share the same impressions ;-)

Any feedback welcome :)

One thing: I see you have set the path to cli tools in config file.
While this allows some flexibility, it means the config file will need to be
different if running the build on my windows pc and on your mac.
I propose instead to make the config file oblivious to the environment, and
use options passed on the cli for environment-related parameters, eg

php pake.php thistask --php=/usr/local/bin/php --doxygen="c:/program
files/doxygen/bin/doxygen.exe"


I believe you can define environment variables on Windows:
- 
https://fisheye6.atlassian.com/browse/zetacomponents/website/Pakefile?hb=true#to150

Sure enough - albeit it's not as common to do it as it's on unix.
I still prefer cli options than env vars for 90% of the time though, as it's 
easier to understand what is happening when the options are explicit.

But, as far as I can see in your code, what you can do is that you can swap out 
one config file with another.

What I was asking to is to separate cofig options: one set that is project-specific (stored in the config file), and one set that is specific to the build environment (passed via cli options or env vars).

Maybe this is not necessary in this case, as the pakefile is really only targeted at one project, but it is a useful separation when the pakefile you produce can be used both for different projects and in different environments.

Also remember to use escapeshellarg() around your command line executables
and paths before invoking them. There might be spaces in them...


I know. As I said earlier on this thread I will take care of that (and
other tiny details) later.


Reply via email to