views:

215

answers:

2

I have a ccnet.config section which I had implemented for a demo purpose. So I have a simple validation check which is done before my build is being triggered. So if the validation passes then my build starts of successfully.So validation check is to count the number of '#defines' present in a single .c file which is a.c for example. I had achieved this using VB scripts(.vbs) which is called with the help of .bat files.

So my doubt is

  1. If it is correct to call my .bat file in the ccnet.config file in the prebuild section.
  2. If I am able to get the return value, ie. the number of #defines in a .c file into a variable in my .bat file, how should I proceed with comparing or validating this return value against a fixed known value?

I hope I am able to convey my doubts clearly. Please get back to me if you need any more clarification.

+1  A: 

The prebuild section is executed before the source is updated, so you probably want to call your bat file in the tasks section instead.

I would make the vbs/bat file do the comparing/validating as well as the counting, then you just have to exit with an errorlevel > 0 to indicate that the build should fail.

Also, ccnet have very good documentation here.

Blorgbeard
A: 

Hi, Thanks a lot for the update u had given.This automation i am doing for a sample build done for some DEMO process.I need to know which section should be included in the ccnet.config file so that i can do some error checking before starting off my building porocess.

Thanks Maddy

Maddy