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

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified
Дата
Msg-id CAB7nPqRGxatnkzPMERSpP17_4pqibB+-50qpJdbv6Jxp1M1Bgg@mail.gmail.com
обсуждение исходный текст
Ответ на patch: version_stamp.pl: Add Git commit info to version if 'git' is specified  (Øyvind A. Holm <sunny@sunbase.org>)
Ответы Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Øyvind A. Holm
Дата:
Сообщение: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified
Следующее
От: Tom Lane
Дата:
Сообщение: Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified