[Lazarus] embed git version info
Sven Barth
pascaldragon at googlemail.com
Wed Mar 27 18:59:24 CET 2013
Am 27.03.2013 16:26 schrieb "Graeme Geldenhuys" <graeme at geldenhuys.co.uk>:
> > Anyway, I tested with the simplest pre-build script:
> >
> > git describe --always > REVISION.INC
>
> If you run the 'git describe' from the command line, you would see the
> output is simply the "version information" (no constant definition or
> string quotes). So you need to place it in your source code with an
> identifier as the Pascal language requires. So you need to do something
> like the following in your code.
>
> const
> cGitRevision = '{$revision.inc}';
This won't work, because the string takes precedance over the directive.
But you could use the data2inc tool that cones with FPC to convert the
returned data to a include file with constant.
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130327/28546b06/attachment-0003.html>
More information about the Lazarus
mailing list