Bug 1488679 - Use MOZ_APP_VERSION_DISPLAY for --version to show the full version r=glandium
☠☠ backed out by bdbab05f9667 ☠ ☠
authorSylvestre Ledru <sledru@mozilla.com>
Wed, 13 Feb 2019 00:19:58 +0100
changeset 458728 1f7d1d6bf61de6fd419cd83933012a377838dfcb
parent 458727 c7f5753a2c71e0d93f19fce8711852c6fbe53f95
child 458729 bdbab05f9667a968745c1400027d50580eb91b1e
push id35546
push userrmaries@mozilla.com
push dateWed, 13 Feb 2019 04:27:59 +0000
treeherdermozilla-central@636d2c00234d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1488679
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1488679 - Use MOZ_APP_VERSION_DISPLAY for --version to show the full version r=glandium
toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -1526,17 +1526,22 @@ static void DumpHelp() {
   // of the bug, because we ship a component.reg file, it works correctly.
   DumpArbitraryHelp();
 }
 
 static inline void DumpVersion() {
   if (gAppData->vendor) {
     printf("%s ", (const char*)gAppData->vendor);
   }
-  printf("%s %s", (const char*)gAppData->name, (const char*)gAppData->version);
+  printf("%s ", (const char*)gAppData->name);
+
+  // Use the displayed version
+  // For example, for beta, we would display 42.0b2 instead of 42.0
+  printf("%s", MOZ_APP_VERSION_DISPLAY);
+
   if (gAppData->copyright) {
     printf(", %s", (const char*)gAppData->copyright);
   }
   printf("\n");
 }
 
 #if defined(MOZ_WIDGET_GTK)
 static RemoteResult ParseRemoteCommandLine(nsCString& program,