Bug 1488679 - Use MOZ_APP_VERSION_DISPLAY for --version to show the full version r=glandium
authorSylvestre Ledru <sledru@mozilla.com>
Wed, 13 Feb 2019 13:50:01 +0000
changeset 458883 56575ed63592
parent 458882 d16f7174737e
child 458884 216b765364a3
push id35551
push usershindli@mozilla.com
push dateWed, 13 Feb 2019 21:34:09 +0000
treeherdermozilla-central@08f794a4928e [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 Differential Revision: https://phabricator.services.mozilla.com/D19026
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", NS_STRINGIFY(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,