在我的项目的生成日志,我可以看到这些属性:如何使用CruiseControlNet将集成属性传递给批处理文件?
<integrationProperties>
<CCNetProject>Gdet_T</CCNetProject>
...
<LastModificationDate>4/6/2010 1:29:04 PM</LastModificationDate>
<LastChangeNumber>10841</LastChangeNumber>
</integrationProperties>
我想物业CCNetProject
和LastChangeNumber
传递给批处理文件。 它可以与CCNetProject
,一起使用,因为它可以在批处理中用作环境变量%CCNetProject%
。
但它不与其他属性(那些没有开始与CCnet
前缀)作为LastChangeNumber
或LastModificationDate
工作。
我试图将它作为参数传递,但它失败!
<exec>
<executable>$(WorkingFolderBase)\MyBatch.bat</executable>
<baseDirectory>$(WorkingFolderBase)\</baseDirectory>
<buildArgs>$(LastModificationDate)</buildArgs>
</exec>
我试图把它作为环境变量,但它未能:
<exec>
<executable>$(WorkingFolderBase)\MyBatch.bat</executable>
<baseDirectory>$(WorkingFolderBase)\</baseDirectory>
<environment>
<variable>
<name>svn_label</name>
<value>"${LastModificationDate}"</value>
</variable>
</environment>
</exec>
结果始终是相同的,当我显示参数或变量:空字符串或变量名$(svn_label)
我确定它很简单,但是...我找不到!任何想法 ?
你混了环境变量和参数的例子。 – 2010-04-07 16:46:45
对!我修好了它。 – TridenT 2010-04-07 17:12:11