[Freeciv-Dev] (PR#4712) future CVS versioning
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
See also PR#2479.
It would be possible to have the cvs version string "automatically"
updated, e.g. "cvs-yymmdd" or some such...but to do this right means
moving the version information out of config.h and version.h and into
version.c. Right now every time the version changes everything has to
be recompiled, which is bad.
The version string has to go straight into CVS, not be generated by
autoconf or configure. We want the actual date of the CVS files, not
the last date when ./configure was run.
That said, the code portions would be pretty simple:
version.h:
const char *get_version_string();
version.c:
#define CVS_VERSION_STRING "cvs20030728"
const char *get_version_string(void)
{
#ifdef IS_DEVEL_VERSION
return CVS_VERSION_STRING;
#else
/* ... */
#endif
}
and the only problem remaining is to determine how/when the version
string is updated.
We've looked into "automatic" updating of CVS, e.g., having a script run
to update a file on every checking. But this is a dangerous hack - if
not done correctly you can have deadlock when cvs tries to commit within
the commit.
Another alternative is simply to have a cron job to run every so often
to do the update checking. This could be every day, every week, or
every time a cvs checking is done.
Either way the script would look something like:
echo "#define CVS_VERSION_STRING \"cvs `date %y%m%d`\"" > file.h
with an
#include "file.h"
in version.c.
Getting this to work properly may be tricky, but it has substantial
benefits for bug reporting.
jason
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#4712) future CVS versioning,
Jason Short <=
|
|