Add location, version and info to send-last-version object.

This commit is contained in:
Gerhard Hoffmann 2024-01-17 15:30:34 +01:00
parent cf77d0ff76
commit d90954c6eb

View File

@ -1127,15 +1127,14 @@ PSAInstalled Worker::getPSAInstalled() {
QString absPathName;
QString absPathNameRepository;
psaInstalled.versionInfo.lastCommit = "";
psaInstalled.versionInfo.reason = "";
psaInstalled.versionInfo.created = "";
psaInstalled.versionInfo.lastCommit = "N/A";
psaInstalled.versionInfo.reason = "N/A";
psaInstalled.versionInfo.created = "N/A";
QStringList versionInfo = m_gc.gitShowReason(m_branchName);
if (versionInfo.size() == 3) {
psaInstalled.versionInfo.lastCommit = versionInfo.at(0);
psaInstalled.versionInfo.reason = versionInfo.at(1);
psaInstalled.versionInfo.created = versionInfo.at(2);
if (m_versionInfo.size() == 3) {
psaInstalled.versionInfo.lastCommit = m_versionInfo.at(0);
psaInstalled.versionInfo.reason = m_versionInfo.at(1);
psaInstalled.versionInfo.created = m_versionInfo.at(2);
}
if (m_zoneNr != 0) {
@ -1148,10 +1147,10 @@ PSAInstalled Worker::getPSAInstalled() {
psaInstalled.tariff.size = getFileSize(absPathName);
psaInstalled.tariff.zone = m_zoneNr;
psaInstalled.tariff.loadTime = Utils::getTariffLoadTime(absPathName);
psaInstalled.tariff.project = Utils::getLocation(absPathName);
psaInstalled.tariff.version = Utils::getTariffVersion(absPathName);
psaInstalled.tariff.info = Utils::getTariffInfo(absPathName);
}
psaInstalled.tariff.project = "Szeged";
psaInstalled.tariff.info = "N/A";
psaInstalled.tariff.version = "N/A";
psaInstalled.hw.linuxVersion = getOsVersion();
psaInstalled.hw.cpuSerial = m_cpuSerial;