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

From Michael Paquier
Subject Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified
Date
Msg-id CAB7nPqRGxatnkzPMERSpP17_4pqibB+-50qpJdbv6Jxp1M1Bgg@mail.gmail.com
Whole thread Raw
In response to patch: version_stamp.pl: Add Git commit info to version if 'git' is specified  (Øyvind A. Holm <sunny@sunbase.org>)
Responses Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Aug 28, 2015 at 12:14 PM, Øyvind A. <sunny@sunbase.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



pgsql-hackers by date:

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