Include git revision with -v output
This commit is contained in:
@@ -55,7 +55,7 @@ with_git_sources = $(core_sources)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
bin_PROGRAMS = profanity
|
bin_PROGRAMS = profanity
|
||||||
profanity_SOURCES = $(main_source) $(with_git_sources)
|
profanity_SOURCES = $(with_git_sources) $(main_source)
|
||||||
|
|
||||||
TESTS = tests/testsuite
|
TESTS = tests/testsuite
|
||||||
check_PROGRAMS = tests/testsuite
|
check_PROGRAMS = tests/testsuite
|
||||||
|
|||||||
17
src/main.c
17
src/main.c
@@ -19,10 +19,13 @@
|
|||||||
* along with Profanity. If not, see <http://www.gnu.org/licenses/>.
|
* along with Profanity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include <string.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#ifdef HAVE_GIT_VERSION
|
||||||
|
#include "gitversion.c"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "profanity.h"
|
#include "profanity.h"
|
||||||
|
|
||||||
@@ -55,7 +58,17 @@ main(int argc, char **argv)
|
|||||||
g_option_context_free(context);
|
g_option_context_free(context);
|
||||||
|
|
||||||
if (version == TRUE) {
|
if (version == TRUE) {
|
||||||
g_print("Profanity, version %s\n", PACKAGE_VERSION);
|
|
||||||
|
if (strcmp(PACKAGE_STATUS, "development") == 0) {
|
||||||
|
#ifdef HAVE_GIT_VERSION
|
||||||
|
g_print("Profanity, version %sdev.%s.%s\n", PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
|
||||||
|
#else
|
||||||
|
g_print("Profanity, version %sdev\n", PACKAGE_VERSION);
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
g_print("Profanity, version %s\n", PACKAGE_VERSION);
|
||||||
|
}
|
||||||
|
|
||||||
g_print("Copyright (C) 2012, 2013 James Booth <%s>.\n", PACKAGE_BUGREPORT);
|
g_print("Copyright (C) 2012, 2013 James Booth <%s>.\n", PACKAGE_BUGREPORT);
|
||||||
g_print("License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n");
|
g_print("License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n");
|
||||||
g_print("\n");
|
g_print("\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user