Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified - Mailing list pgsql-hackers

From Tom Lane
Subject Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified
Date
Msg-id 5001.1440735433@sss.pgh.pa.us
Whole thread Raw
In response to Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified  (Øyvind A. Holm <sunny@sunbase.org>)
List pgsql-hackers
Michael Paquier <michael.paquier@gmail.com> writes:
> ... you can already append
> a custom string after the version string with --with-extra-version in
> configure. Here is for example one I use for development:
> GIT_CURRENT=`cd $PGSOURCE && git rev-parse --short HEAD`
> ./configure --with-extra-version=-$GIT_CURRENT

Yeah.  To clarify my earlier comment: what Salesforce did[1] was basically
to modify the configure script to do this automatically.  That meant that
even a heavily-hacked development build would still advertise itself as
having an identifiable commit hash.  I think that leads to at least as
much confusion as value added.

The only way that something like this can have any integrity is if the
hash is added in an automated, hands-off build process that works only
from clean git pulls.  The approach Michael suggests works just fine as
part of a build script that's used that way.  But I doubt that it's wise
to put it somewhere where the hash could end up in hand-modified builds.
        regards, tom lane

[1]: dept of full disclosure: said patch was actually my idea.  It was
a bad one.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified
Next
From: Øyvind A. Holm
Date:
Subject: Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified