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

2

6

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

Countdown answered 11/9, 2009 at 8:27 Comment(0)
E
6

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.

Earing answered 11/9, 2009 at 8:36 Comment(0)
B
2

There seems to be something wrong with your setup, because I'm using

<buildArgs>-D:publishroot="$(publish-directory)"</buildArgs>

and NAnt sees this as expected. Does the value of the variable contain spaces? I had problems with this before.

Barbie answered 11/9, 2009 at 9:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.