mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Align the full version schema across all artifacts
Summary: The version number used for packaging symbols and xswiftbus was not the full one including the timestamp. This change adds the last commit timestamp (in contrast to the build timestamp used before) as regular part of the version number. This helps us to also keep the version number consistent with the content across all installers. The version number will change only, if the last commit was modified and not with each different build. In the end, all jenkins jobs building from the same commit should produce artifacts with the same version everywhere. ref T204 Reviewers: #swift_pilot_client, kbasan Reviewed By: #swift_pilot_client, kbasan Subscribers: jenkins Maniphest Tasks: T204 Differential Revision: https://dev.swift-project.org/D68
This commit is contained in:
@@ -161,6 +161,22 @@ const QString &BlackConfig::CBuildConfig::gitHeadSha1()
|
||||
return gitHeadSha1;
|
||||
}
|
||||
|
||||
namespace Private
|
||||
{
|
||||
const QDateTime lastCommitTimestampImpl()
|
||||
{
|
||||
QDateTime dt = QDateTime::fromString(\"$$GIT_COMMIT_TS\", \"yyyyMMddHHmm\");
|
||||
dt.setTimeSpec(Qt::UTC);
|
||||
return dt;
|
||||
}
|
||||
}
|
||||
|
||||
const QDateTime &BlackConfig::CBuildConfig::lastCommitTimestamp()
|
||||
{
|
||||
static const QDateTime dt = Private::lastCommitTimestampImpl();
|
||||
return dt;
|
||||
}
|
||||
|
||||
int BlackConfig::CBuildConfig::versionMajor() { return $$BLACK_VER_MAJ; }
|
||||
int BlackConfig::CBuildConfig::versionMinor() { return $$BLACK_VER_MIN; }
|
||||
int BlackConfig::CBuildConfig::versionMicro() { return $$BLACK_VER_MIC; }
|
||||
|
||||
Reference in New Issue
Block a user