[gnome-builder/gnome-builder-3-24] app: Show full version on command line
- From: Matthew Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-24] app: Show full version on command line
- Date: Wed, 22 Mar 2017 23:02:30 +0000 (UTC)
commit 6527f5282ba1b6820a32a4a9ba03ab6815b75eba
Author: Matthew Leeds <mleeds redhat com>
Date: Wed Mar 22 15:44:00 2017 -0500
app: Show full version on command line
libide/application/ide-application-command-line.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/libide/application/ide-application-command-line.c
b/libide/application/ide-application-command-line.c
index f321481..6d37bca 100644
--- a/libide/application/ide-application-command-line.c
+++ b/libide/application/ide-application-command-line.c
@@ -359,7 +359,20 @@ ide_application_local_command_line (GApplication *application,
if (version)
{
- g_print (PACKAGE_STRING"\n");
+ g_autoptr(GString) version_str = NULL;
+
+ version_str = g_string_new (PACKAGE_VERSION);
+
+#ifdef COMMIT_ID
+ g_string_append (version_str, "+"COMMIT_ID);
+#endif
+
+#ifdef CHANNEL
+ if (g_strcmp0 (CHANNEL, "distro") != 0)
+ g_string_append (version_str, " ("CHANNEL")");
+#endif
+
+ g_print ("%s\n", version_str->str);
*exit_status = EXIT_SUCCESS;
goto cleanup;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]