[GRASS-dev] svn rev into g.version

Hamish hamish_b at yahoo.com
Tue May 5 07:50:03 EDT 2009


> Hamish wrote:
> > would it be possible to add svn revision to g.version, much like we
> > hard code the rev into libgis now?

Glynn wrote:
> The SVN revision of which file? The version in lib/gis is the revision
> of gis.h; if you want that, it's available in GIS_H_VERSION, in the
> format "$Revision: 36878 $".

that's probably the most useful, because the rest (individual modules
etc) can be recompiled along the way.

is GRASS_VERSION_UPDATE_PKG still relevant?


what I'd like to do is something like

if [ `grep -c svn $GRASS_VERSION_NUMBER` -eq 1 ] ; then
   fprintf(stdout, "GRASS %s %s (%s) %s\n",
	    GRASS_VERSION_NUMBER, GIS_H_VERSION, GRASS_VERSION_DATE,
	    GRASS_VERSION_UPDATE_PKG);
else
   fprintf(stdout, "GRASS %s (%s) %s\n",
	    GRASS_VERSION_NUMBER, GRASS_VERSION_DATE,
	    GRASS_VERSION_UPDATE_PKG);
fi


.... and maybe strip away the two "$"s with G_tokenize() or something
to pretty it up.


also in GRASS 7 I'd like to have it as "GRASS GIS $version" not
"GRASS $version" as it reads a bit better. Wait for grass7 to do that
in case anyone is counting on {cut -d2 -f' '} to work. but then maybe
it is better to further reduce the GIS_H_VERSION to the number so the
version number then becomes like 6.4.0svn32000 in grass 6?


Hamish



      



More information about the grass-dev mailing list