Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Øyvind A(dot) <sunny(at)sunbase(dot)org>
Cc: PostgreSQL mailing lists <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 03:27:21
Message-ID: CAB7nPqRGxatnkzPMERSpP17_4pqibB+-50qpJdbv6Jxp1M1Bgg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 28, 2015 at 12:14 PM, Øyvind A. <sunny(at)sunbase(dot)org> wrote:
> this is a patch for src/tools/version_stamp.pl that adds the current Git
> commit information from "git describe --tags --long" to the current
> version string if "git" is specified on the command line. I've been
> testing for regressions and such lately (none found, yay), and the
> current output from for example "psql --version" only shows "psql
> (PostgreSQL) 9.6devel" without any reference to which commit it was
> compiled from.

What's the point? version_stamp.pl is used only by maintainers to bump
easily the version number in the code tree. And 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
This custom string is actually added in PG_VERSION and PG_VERSION_STR,
and generates things like that:
$ psql --version
psql (PostgreSQL) 9.6devel-2edb949

To be short, the method currently in place is far more flexible than
what you propose, and the patch you are proposing has the disadvantage
to create diffs in the code tree, which is not that helpful for
development purposes.

Regards,
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-08-28 03:46:51 Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified
Previous Message Øyvind A. Holm 2015-08-28 03:14:49 patch: version_stamp.pl: Add Git commit info to version if 'git' is specified