mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 00:46: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:
@@ -205,6 +205,7 @@ main(int argc, char **argv)
|
||||
help_option = true;
|
||||
break;
|
||||
|
||||
/* -V/--version */
|
||||
case 'V':
|
||||
|
||||
/*
|
||||
@@ -215,6 +216,11 @@ main(int argc, char **argv)
|
||||
printf("%s %s\n", progname(), REPMGR_VERSION);
|
||||
exit(SUCCESS);
|
||||
|
||||
/* --version-number */
|
||||
case OPT_VERSION_NUMBER:
|
||||
printf("%i\n", REPMGR_VERSION_NUM);
|
||||
exit(SUCCESS);
|
||||
|
||||
/*------------------------------
|
||||
* general configuration options
|
||||
*------------------------------
|
||||
@@ -2012,6 +2018,7 @@ do_help(void)
|
||||
printf(_("General options:\n"));
|
||||
printf(_(" -?, --help show this help, then exit\n"));
|
||||
printf(_(" -V, --version output version information, then exit\n"));
|
||||
printf(_(" --version-number output version number, then exit\n"));
|
||||
puts("");
|
||||
|
||||
printf(_("General configuration options:\n"));
|
||||
|
||||
Reference in New Issue
Block a user