You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
38 lines
730 B
C++
38 lines
730 B
C++
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
||
|
|
|
||
|
|
#include "UnsyncVersion.h"
|
||
|
|
|
||
|
|
namespace unsync {
|
||
|
|
|
||
|
|
const std::string&
|
||
|
|
GetVersionString()
|
||
|
|
{
|
||
|
|
static std::string Result = []()
|
||
|
|
{
|
||
|
|
// TODO: generate a version string based on git state
|
||
|
|
const char* GitRev = "";
|
||
|
|
const char* GitBranch = "";
|
||
|
|
// const char* GIT_TAG = nullptr;
|
||
|
|
|
||
|
|
static char Str[256];
|
||
|
|
|
||
|
|
if (strlen(GitBranch) && strlen(GitRev))
|
||
|
|
{
|
||
|
|
snprintf(Str, sizeof(Str), UNSYNC_VERSION_STR " [%s:%s]", GitBranch, GitRev);
|
||
|
|
}
|
||
|
|
else if (strlen(GitRev))
|
||
|
|
{
|
||
|
|
snprintf(Str, sizeof(Str), UNSYNC_VERSION_STR " [%s]", GitRev);
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
snprintf(Str, sizeof(Str), UNSYNC_VERSION_STR);
|
||
|
|
}
|
||
|
|
|
||
|
|
return std::string(Str);
|
||
|
|
}();
|
||
|
|
|
||
|
|
return Result;
|
||
|
|
}
|
||
|
|
|
||
|
|
} // namespace unsync
|