software release methodology

Matthew Gillen me-5yx05kfkO/aqeI1yJSURBw at public.gmane.org
Mon Jul 16 09:10:33 EDT 2007


Stephen Adler wrote:
> Guys,
> 
> For those of you who are actively involved in software projects, I was
> wondering how you go about giving your software project a version
> number. Specifically, how do you tag the version string in your code so
> that when you do something like
> 
>   myexecutable --version
> 
> then prints out the version number of the software. Are there methods
> within code repository tools like subversion or cvs which will fill in a
> string or something with a version number or tag string so that when you
> do a checkout, it automatically replaces the string? Or do you have to
> manually change a string constant within your code and then commit the
> change to the released version of the code?

I've seen a lot of projects that do the latter (manual commit of hard-coded
string), where the version that gets the updated string is tagged as the release.

Most projects don't release often enough to do something cute with checkouts.
 Either someone's using the latest stable, or they are using a HEAD checkout,
in which case they should be knowledgeable enough to tell you exactly what
revision they're using.

If you're using subversion, you really need external processing to determine
the global version number (there are in-file keywords like in cvs, but there's
currently only a keyword for the latest $REV that affected a particular file,
which wouldn't tell you much).  Luckily, they provide a tool for that though:
http://svnbook.red-bean.com/nightly/en/svn.ref.svnversion.re.html

HTH,
Matt

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.






More information about the Discuss mailing list