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

From Fabien COELHO
Subject Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified
Date
Msg-id alpine.DEB.2.10.1508280733290.16616@sto
Whole thread Raw
In response to Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified
List pgsql-hackers
> Salesforce did something similar in their internal build, and TBH I do 
> not find it a good idea.  The basic problem is it's completely 
> misleading to equate the last commit with the source you actually built 
> from, because that might not have been an unmodified file set.

Indeed. What I've done in an svn-based project is to build the stamp from 
the Makefile basically when linking, that is really as late as possible. 
The other good point is that svnversion adds 'M' for modified if the 
source tree has uncommitted changes.

Maybe such an approach could be used with git to have something reliable.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: Raising our compiler requirements for 9.6
Next
From: Noah Misch
Date:
Subject: Re: [BUGS] Compile fails on AIX 6.1