Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I pass a value from cc.net to build-script? ccnet.config->xx.build

I have various settings in my ccnet.config file and wish to pass them to my build file in order to keep these constants in one place.

How do I do that?!

Thanks,

Anders, Denmark

like image 382
Anders Juul Avatar asked Sep 11 '09 08:09

Anders Juul


1 Answers

Assuming your build file is a NAnt file, you would do it like this:

<nant>
    <buildFile>xx.build</buildFile>
    <buildArgs>-D:foo="$(foo)" -D:bar="$(bar)"</buildArgs>
    ...
</nant>

You can access the variable in the build script via ${foo} resp. ${bar} then.

like image 150
The Chairman Avatar answered Sep 20 '22 07:09

The Chairman