diff --git a/src/ripple_app/main/RippleMain.cpp b/src/ripple_app/main/RippleMain.cpp index 8bcd1909d9..3b5560bf31 100644 --- a/src/ripple_app/main/RippleMain.cpp +++ b/src/ripple_app/main/RippleMain.cpp @@ -281,6 +281,7 @@ int RippleMain::run (int argc, char const* const* argv) ("net", "Get the initial ledger from the network.") ("fg", "Run in the foreground.") ("import", importDescription.toStdString ().c_str ()) + ("version", "Display the build version.") ; // Interpret positional arguments as --parameters. @@ -334,6 +335,13 @@ int RippleMain::run (int argc, char const* const* argv) iResult = 1; } + if (vm.count ("version")) + { + String const& s (BuildInfo::getVersionString ()); + std::cout << "rippled version " << s.toStdString() << std::endl; + return 0; + } + // Use a watchdog process unless we're invoking a stand alone type of mode // if (HaveSustain ()