mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-03 13:45:34 +00:00
Include revision number in the "version" command line option (Closes #1711)
This commit is contained in:
parent
60499eff83
commit
b4ba18afe7
1 changed files with 8 additions and 0 deletions
|
@ -184,6 +184,14 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
|
|||
if (variables.count ("version"))
|
||||
{
|
||||
std::cout << "OpenMW version " << OPENMW_VERSION << std::endl;
|
||||
|
||||
std::string rev = OPENMW_VERSION_COMMITHASH;
|
||||
std::string tag = OPENMW_VERSION_TAGHASH;
|
||||
if (!rev.empty() && !tag.empty())
|
||||
{
|
||||
rev = rev.substr(0, 10);
|
||||
std::cout << "Revision " << rev << std::endl;
|
||||
}
|
||||
run = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue