Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2003:
[Freeciv-Dev] (PR#4712) future CVS versioning
Home

[Freeciv-Dev] (PR#4712) future CVS versioning

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#4712) future CVS versioning
From: "John Wheeler" <jdwheeler42@xxxxxxxxx>
Date: Sun, 21 Sep 2003 06:17:31 -0700
Reply-to: rt@xxxxxxxxxxxxxx

[jdorje - Mon Jul 28 21:51:41 2003]:

> 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:
> [code snipped]
> 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.

Would it work if the version string were put in its own text file, which
would be updated in CVS after every commit and read in at runtime?  This
should take care of needless recompiling (but, I wouldn't recommend it
for stable versions).  Also, maybe should all the #defines be taken out
of version.h, and use wrapper functions to access the values elsewhere
in the program?  I would think doing this first would make it easier to
change how the version is determined.

-- 

++JohnWheeler


[Prev in Thread] Current Thread [Next in Thread]