Automatically incrementing a variable with each build

This forum is for all Flare issues not related to any of the other categories.
Post Reply
gruffbear
Jr. Propeller Head
Posts: 2
Joined: Thu Nov 18, 2010 12:46 pm
Location: Jersey City, NJ

Automatically incrementing a variable with each build

Post by gruffbear »

Greetings.

Like many companies, mine uses a four-part number for identifying its software releases -- major.minor.maintenance.build . In my project, I currently have each part of this number set up with separate variables, as in [VersionMajor].[VersionMinor].[VersionMaintenance].[Version Build]

Is it possible to increment a variable automatically with each build? If so, I could set up the "build" part of the release number to do this.

If you have done this -- or if you know it isn't possible -- I would be interested to hear from you. Thank you.
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: Automatically incrementing a variable with each build

Post by Andrew »

It's not possible with variables. However, I'm not sure that if it were, it would be a good idea. Do you only build your help when you application gets built? Does your app build process kicks off a command-line build in Flare? If a build happens any time outside of that process, or the build fails in a way that does not increment the number, your build numbers will get out of synch.

You may be able to gin something up with JavaScript, or it may be easiest to simply jury rig a vbscript or batch file that checks your application's build number, and adjusts the variable accordingly (before the build, obviously).
Flare v6.1 | Capture 4.0.0
Carsten Pedersen
Propeller Head
Posts: 96
Joined: Wed Feb 08, 2006 1:11 am

Re: Automatically incrementing a variable with each build

Post by Carsten Pedersen »

We do this during out automatic build:

*We define a variable in Vault e.g. BuildNumber and set it to <ChangedByAutoBuild> in the Vault environment.
* During the automatic build before the Vault build we replaced the occurrence of the variable <ChangedByAutoBuild>
in the variables xml file with the current build number we have in the build environment.

Probably not the best way, but it works.

-cpede
samjones6
Sr. Propeller Head
Posts: 168
Joined: Tue Mar 08, 2011 5:03 pm

Re: Automatically incrementing a variable with each build

Post by samjones6 »

I use a powershell script to do a text replace in the .htm file....
Post Reply