[crossfire] SVN revions in version

Alex Schultz alex_sch at telus.net
Fri Oct 13 09:27:52 CDT 2006


A few times, tracking the svn revision instead of the $Id strings has
been brought up. IMHO this should be done, both in the client and
server. I propose we implement it as follows in both:

Create a version.h file containing something like:

#include "svnversion.h"

#define BASE_VERSION "2.0.0-dev"

#ifdef SVN_REV
#define VERSION BASE_VERSION"-r"SVN_REV
#else
#define VERSION BASE_VERSION
#endif

In release tarballs, the "-dev" postfix to BASE_VERSION will be removed
and it will be adjusted to ignore SVN_REV. Then have a defaultly blank
svnversion.h file, which the building process will create simply in the
form of:

#define SVN_REV "5678"

The ./configure stage will check for the presence of .svn and the
svnversion command, while the build process will run svnversion. The
build process running svnversion because not all revisions require
./configure to be re-run. Also, it will only write svnversion.h if a
check shows that it was checked out from official crossfire svn, this is
to ensure all revision numbers correspond to the same repository.

This version would both be used in the client for outputing to the
console instead of the rcs-id values, and the server will use this
version for reporting to the metaserver as well as console output. Does
this model make sense to everyone?

Alex Schultz



More information about the crossfire mailing list