I expected someone else to have chimed in with a full-fledged code
example by now. Since nobody did, I will offer my point in a direction
I have used before, without any actual code.

The last time I did this it was with a big PHP project, with multiple
files. The way that I did it was keep a variable in the main file (the
Flex equivilent would be your main mxml file). There is a way, at
least with subversion and cvs, to change at checkin time, a variable
to the version number. Something like:

private var versionNumber: String = '$Version$';

It has been a while, so that is going ot need to be looked up and
corrected, probably.

At initialization, look at Application.application.maxVersion, check
against your own version number and if you're larger, replace
Application.application.maxVersion with your own version string. After
everything is initialized, the version number at
Application.application.maxVersion is the last checkin number of a
file that "mattered."

You can also keep a hash around as well, with a key that identifies
the particular file and at runtime print a list of the versions of
each file.

Yes, I would like an easier way, but this requires no explicit support
from the language and should work virtually anywhere where you can
extract a raw version number from the string that subversion/cvs gives
you.

Daniel

On 17 Apr 2007 08:56:34 -0700, Tom Chiverton
<[EMAIL PROTECTED]> wrote:
> On Tuesday 17 Apr 2007, bhaq1972 wrote:
> > we actually have a variable like this and my poor colleague has to
> > always update it before being released to our testers.
> >
> > It would make his life so much easier if something was built into
> > flexbuilder.
>
> Ditto. Which was the original question.
> If Cruise Control has this, it's very well hidden.
>
> I suppose your CC build script could run sed over the source or something but
> that's fairly yuck too.
>
> --
> Tom Chiverton
> Helping to seamlessly architect distributed web-readiness
> on: http://thefalken.livejournal.com
>
> ****************************************************
>
> This email is sent for and on behalf of Halliwells LLP.
>
> Halliwells LLP is a limited liability partnership registered in England and 
> Wales under registered number OC307980 whose registered office address is at 
> St James's Court Brown Street Manchester M2 2JF.  A list of members is 
> available for inspection at the registered office. Any reference to a partner 
> in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by 
> the Law Society.
>
> CONFIDENTIALITY
>
> This email is intended only for the use of the addressee named above and may 
> be confidential or legally privileged.  If you are not the addressee you must 
> not read it and must not use any information contained in nor copy it nor 
> inform any person other than Halliwells LLP or the addressee of its existence 
> or contents.  If you have received this email in error please delete it and 
> notify Halliwells LLP IT Department on 0870 365 8008.
>
> For more information about Halliwells LLP visit www.halliwells.com.
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>

Reply via email to