Command line build with conditions

This forum is for all Flare related Tips and Tricks.
Have a tip or trick you use while working in Flare? Share it here.
Post Reply
jholmes
Jr. Propeller Head
Posts: 5
Joined: Mon Apr 06, 2009 11:52 am

Command line build with conditions

Post by jholmes »

Can you add conditions to a command line build? I have several word outputs that I create using different tags and it would be nice to be able to build them all in a batch.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Command line build with conditions

Post by LTinker68 »

I've never used the command line build, but can't you build multiple targets from the same command line? The targets would control the conditions of the outputs.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
jholmes
Jr. Propeller Head
Posts: 5
Joined: Mon Apr 06, 2009 11:52 am

Re: Command line build with conditions

Post by jholmes »

But they're all the same target (word) - I just change up the condition tags depending on the document set i need to create. Am I missing something?
alaltenburg
Sr. Propeller Head
Posts: 342
Joined: Mon Nov 03, 2008 9:33 am
Location: The heart of America

Re: Command line build with conditions

Post by alaltenburg »

The command line is setup so it is telling madcap to build a specified target. Whatever conditions you have selected within the madcap target, that will be what is included.

Hope that helps.
Andrea
The Moon is the first milestone on the road to the stars.

— Arthur C. Clarke
SteveS
Senior Propellus Maximus
Posts: 2090
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
Contact:

Re: Command line build with conditions

Post by SteveS »

If you're changing the project before each build, comman line building will not be much help.

I think you will need to create a different target for each of your word documents. If you want them in the same destination folder you will need to change the output file name, on the basic tab from the target properties, for each document.

HTH
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Command line build with conditions

Post by doc_guy »

I've successfully built several Word document targets at the same time from the command line, and the trick is exactly what Steve is suggesting. You need a separate target for each version of the Word document that you want to create. Make sure you have a different file name for each target. Then you can use the command line to build all the targets at the same time, or you can write a very simple script that will do it for you.

When I needed a daily build of the documentation, created a simple .bat file in Windows that checked out the latest documents from SVN, built each target, and copied each target to the proper location on a production server. Then it had a cron job in Windows run that .bat file every night at 1AM.

Each day when we came into the office, the help system had been created with the latest changes from all contributors.

But the key is knowing that you need a separate target file in Flare for each version of the project that you are building.
Paul Pehrson
My Blog

Image
jholmes
Jr. Propeller Head
Posts: 5
Joined: Mon Apr 06, 2009 11:52 am

Re: Command line build with conditions

Post by jholmes »

Thanks everyone - I'll give it a try. This is going to make my life so much easier!
jholmes
Jr. Propeller Head
Posts: 5
Joined: Mon Apr 06, 2009 11:52 am

Re: Command line build with conditions

Post by jholmes »

It works - and much easier than the build script mess I thought I had in store for me. A solid example of missing the obvious!
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Command line build with conditions

Post by doc_guy »

Yay. Glad it worked. Let us know if we can help again.
Paul Pehrson
My Blog

Image
Post Reply