mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +08:00
New schema for the 4th segment of the swift version number
Based on a count of the number of commits since any of the first 3 segments were changed.
This commit is contained in:
@@ -87,17 +87,7 @@ namespace XSwiftBus
|
||||
|
||||
std::string CService::getVersionNumber() const
|
||||
{
|
||||
std::string version(XSWIFTBUS_VERSION);
|
||||
const std::string lastCommitTs(GIT_COMMIT_TS);
|
||||
|
||||
const long long lctsll = std::stoll(lastCommitTs); // at least 64bit
|
||||
// now we have to converto int
|
||||
// max 2147483647 (2^31 - 1)
|
||||
// 1MMddHHmm (years since 2010)
|
||||
const long long yearOffset = 201000000000;
|
||||
const int lctsInt = static_cast<int>(lctsll - yearOffset);
|
||||
version = version + "." + std::to_string(lctsInt);
|
||||
return version;
|
||||
return XSWIFTBUS_VERSION;
|
||||
}
|
||||
|
||||
std::string CService::getCommitHash() const
|
||||
|
||||
Reference in New Issue
Block a user