mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 17:06:29 +00:00
Add command line option "repmgr --version-number"
Outputs the raw version number. Intended for use by scripts etc.
This commit is contained in:
1
HISTORY
1
HISTORY
@@ -1,4 +1,5 @@
|
|||||||
4.3 2019-??
|
4.3 2019-??
|
||||||
|
repmgr: add --version-number command line option (Ian)
|
||||||
repmgrd: check binary and extension major versions match; GitHub #515 (Ian)
|
repmgrd: check binary and extension major versions match; GitHub #515 (Ian)
|
||||||
|
|
||||||
4.2.1 2018-??-??
|
4.2.1 2018-??-??
|
||||||
|
|||||||
@@ -15,6 +15,31 @@
|
|||||||
See also: <xref linkend="upgrading-repmgr">
|
See also: <xref linkend="upgrading-repmgr">
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<sect1 id="release-4.3">
|
||||||
|
<title>Release 4.3</title>
|
||||||
|
<para><emphasis>???, 2019</emphasis></para>
|
||||||
|
<para>
|
||||||
|
&repmgr; 4.3 is a major release.
|
||||||
|
</para>
|
||||||
|
<sect2>
|
||||||
|
<title>repmgr enhancements</title>
|
||||||
|
<para>
|
||||||
|
<itemizedlist>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<command>repmgr --version-number</command> outputs the "raw"
|
||||||
|
repmgr version number (e.g. <literal>40300</literal>). This is intended
|
||||||
|
for use by scripts etc. requiring an easily parseable representation
|
||||||
|
of the &repmgr; version.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
|
||||||
|
</sect1>
|
||||||
|
|
||||||
<sect1 id="release-4.2">
|
<sect1 id="release-4.2">
|
||||||
<title>Release 4.2</title>
|
<title>Release 4.2</title>
|
||||||
<para><emphasis>Wed October 24, 2018</emphasis></para>
|
<para><emphasis>Wed October 24, 2018</emphasis></para>
|
||||||
|
|||||||
@@ -205,6 +205,7 @@ main(int argc, char **argv)
|
|||||||
help_option = true;
|
help_option = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* -V/--version */
|
||||||
case 'V':
|
case 'V':
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -215,6 +216,11 @@ main(int argc, char **argv)
|
|||||||
printf("%s %s\n", progname(), REPMGR_VERSION);
|
printf("%s %s\n", progname(), REPMGR_VERSION);
|
||||||
exit(SUCCESS);
|
exit(SUCCESS);
|
||||||
|
|
||||||
|
/* --version-number */
|
||||||
|
case OPT_VERSION_NUMBER:
|
||||||
|
printf("%i\n", REPMGR_VERSION_NUM);
|
||||||
|
exit(SUCCESS);
|
||||||
|
|
||||||
/*------------------------------
|
/*------------------------------
|
||||||
* general configuration options
|
* general configuration options
|
||||||
*------------------------------
|
*------------------------------
|
||||||
@@ -2012,6 +2018,7 @@ do_help(void)
|
|||||||
printf(_("General options:\n"));
|
printf(_("General options:\n"));
|
||||||
printf(_(" -?, --help show this help, then exit\n"));
|
printf(_(" -?, --help show this help, then exit\n"));
|
||||||
printf(_(" -V, --version output version information, then exit\n"));
|
printf(_(" -V, --version output version information, then exit\n"));
|
||||||
|
printf(_(" --version-number output version number, then exit\n"));
|
||||||
puts("");
|
puts("");
|
||||||
|
|
||||||
printf(_("General configuration options:\n"));
|
printf(_("General configuration options:\n"));
|
||||||
|
|||||||
@@ -92,6 +92,8 @@
|
|||||||
#define OPT_NO_WAIT 1040
|
#define OPT_NO_WAIT 1040
|
||||||
#define OPT_MISSING_SLOTS 1041
|
#define OPT_MISSING_SLOTS 1041
|
||||||
#define OPT_REPMGRD_NO_PAUSE 1042
|
#define OPT_REPMGRD_NO_PAUSE 1042
|
||||||
|
#define OPT_VERSION_NUMBER 1043
|
||||||
|
|
||||||
|
|
||||||
/* deprecated since 3.3 */
|
/* deprecated since 3.3 */
|
||||||
#define OPT_DATA_DIR 999
|
#define OPT_DATA_DIR 999
|
||||||
@@ -102,8 +104,9 @@
|
|||||||
static struct option long_options[] =
|
static struct option long_options[] =
|
||||||
{
|
{
|
||||||
/* general options */
|
/* general options */
|
||||||
{"version", no_argument, NULL, 'V'},
|
|
||||||
{"help", no_argument, NULL, OPT_HELP},
|
{"help", no_argument, NULL, OPT_HELP},
|
||||||
|
{"version", no_argument, NULL, 'V'},
|
||||||
|
{"version-number", no_argument, NULL, OPT_VERSION_NUMBER},
|
||||||
|
|
||||||
/* general configuration options */
|
/* general configuration options */
|
||||||
{"config-file", required_argument, NULL, 'f'},
|
{"config-file", required_argument, NULL, 'f'},
|
||||||
|
|||||||
Reference in New Issue
Block a user