> I've written an application where I need to keep up with the version
> number.  I'm trying to figure out an elegant way to maintain that in the
> simplest and perhaps the most automated way.  My source is kept in a cvs
>   archive but of course there are dozens of files so it would be
> difficult to base a version number on the version number of a single
> source or would it?
>
> The number would be displayed as part of the title(<TITLE> My App
> 0.92</TITLE>) in the index.jsp so it would have to be easily available
> to that file. I suppose I could use JNDI, I could hardwire it into the
> index.jsp file, but I probably want to put it into other .jsp files also
> and it would be harder to keep up with that way.

Since you're using cvs, you could also leverage it's keyword facility:

  String ident = "$Name$";      # expands to branch name
  String ident = "$Revision$";  # expands to cvs's version
  String ident = "$Date$";      # expands date of last commit

Where "$Revision$" appears in the source file, cvs expands this to
something like "$Revision: 1.3 $" each time the file is checked out of
the repository.

You could, for example, make these constants in an interface, and set
up a cron job/scheduled task to force a checkin each day.  cvs will
take care of updating the expansions in the source file.

Just another idea.

-- 
Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to