[gnome-builder] build: add distribution channel option for debugging
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] build: add distribution channel option for debugging
- Date: Tue, 28 Feb 2017 00:03:14 +0000 (UTC)
commit 2ac7af205e6f6b77e545015521465fa2a470dbdc
Author: Christian Hergert <chergert redhat com>
Date: Mon Feb 27 16:01:08 2017 -0800
build: add distribution channel option for debugging
It really helps us to know how the user got the application, so add a
suffix to the version that gives us a hint to that. If we detect
INSIDE_JHBUILD at build time, we assume this is a jhbuild build. If we
notice .git, but no INSIDE_JHBUILD, we assume this is a local developer
build and they are *NOT* using jhbuild. If it is from a tarball, we should
detect distr (assuming no jhbuild present). And the flatpak builds will
be updated to include --with-channel=flatpak-nightly and such.
configure.ac | 16 +++++++++++++++-
libide/application/ide-application-actions.c | 18 +++++++++++++-----
2 files changed, 28 insertions(+), 6 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e8fa3a4..1cad334 100644
--- a/configure.ac
+++ b/configure.ac
@@ -108,6 +108,20 @@ fi
dnl ***********************************************************************
+dnl Setup the "channel" name to help us track down user issues
+dnl ***********************************************************************
+channel_guess=distro
+AS_IF([test -d "${srcdir}/.git"],[channel_guess=devel])
+AS_IF([test x$UNDER_JHBUILD != x],[channel_guess=jhbuild])
+AC_ARG_WITH([channel],
+ AS_HELP_STRING([--enable-channel=@<:@devel/distro/jhbuild/flatpak-nightly/flatpak-stable@:>@],
+ [Sets the distribution channel for the build to help developers track down bugs]),
+ [channel=$withval],
+ [channel=$channel_guess])
+AC_DEFINE_UNQUOTED([CHANNEL], ["$channel"], [Distribution channel for Builder])
+
+
+dnl ***********************************************************************
dnl Check for Required Headers
dnl ***********************************************************************
AC_ARG_ENABLE([editorconfig],
@@ -541,7 +555,7 @@ AC_OUTPUT
echo ""
-echo " ${PACKAGE} - ${VERSION}"
+echo " ${PACKAGE} - ${VERSION} (${channel})"
echo ""
echo " Options"
echo ""
diff --git a/libide/application/ide-application-actions.c b/libide/application/ide-application-actions.c
index e3100b9..82aaba3 100644
--- a/libide/application/ide-application-actions.c
+++ b/libide/application/ide-application-actions.c
@@ -92,6 +92,7 @@ ide_application_actions_about (GSimpleAction *action,
gpointer user_data)
{
IdeApplication *self = user_data;
+ g_autoptr(GString) version = NULL;
GtkDialog *dialog;
GtkWindow *parent = NULL;
GList *iter;
@@ -110,6 +111,17 @@ ide_application_actions_about (GSimpleAction *action,
}
}
+ version = g_string_new (PACKAGE_VERSION);
+
+#ifdef COMMIT_ID
+ g_string_append (version, "+"COMMIT_ID);
+#endif
+
+#ifdef CHANNEL
+ if (g_strcmp0 (CHANNEL, "distro") != 0)
+ g_string_append (version, " ("CHANNEL")");
+#endif
+
dialog = g_object_new (GTK_TYPE_ABOUT_DIALOG,
"artists", ide_application_credits_artists,
"authors", ide_application_credits_authors,
@@ -122,11 +134,7 @@ ide_application_actions_about (GSimpleAction *action,
"program-name", _("GNOME Builder"),
"transient-for", parent,
"translator-credits", _("translator-credits"),
-#ifdef COMMIT_ID
- "version", PACKAGE_VERSION "+" COMMIT_ID,
-#else
- "version", PACKAGE_VERSION,
-#endif
+ "version", version->str,
"website", "https://wiki.gnome.org/Apps/Builder",
"website-label", _("Learn more about GNOME Builder"),
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]