From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Øyvind A(dot) <sunny(at)sunbase(dot)org>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified |
Date: | 2015-08-28 16:13:59 |
Message-ID: | CAMkU=1zviO22Z8yG6PNkg06o6AejQqWw=vpcOSpt4NpbKuz3uA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Aug 28, 2015 at 1:44 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2015-08-28 07:48:28 +0200, Fabien COELHO wrote:
> > >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.
>
> I've done the same using the output $(git describe --tags --dirty) -
> which will return something like REL9_5_ALPHA1-330-g8a7d070-dirty. That
> is, the last tag, the number of commits since, the commit hash, and
> whether the current build tree is dirty.
>
That looks handy. But, why isn't it alpha2 rather than alpha1 ?
Cheers,
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2015-08-28 16:19:09 | Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified |
Previous Message | Teodor Sigaev | 2015-08-28 16:10:05 | Re: Proposal: Implement failover on libpq connect level. |