Initialize m_versionInfo and send its contents to ISMAS in the update-process.

This commit is contained in:
Gerhard Hoffmann 2024-01-17 15:28:49 +01:00
parent 73d02d214a
commit cf77d0ff76

View File

@ -140,6 +140,7 @@ Worker::Worker(int customerNr,
, m_serialInterface(serialInterface)
, m_baudrate(baudrate)
, m_gc(m_customerNrStr, m_customerRepository, m_workingDirectory, m_branchName, this)
, m_versionInfo(QStringList())
, m_osVersion(getOsVersion())
, m_atbqtVersion(getATBQTVersion())
, m_atbUpdateToolVersion(getATBUpdateToolVersion())
@ -301,6 +302,9 @@ void Worker::privateUpdate() {
setProgress(i); // and switch to branch
if (m_gc.gitCloneAndCheckoutBranch()) {
if (!isRepositoryCorrupted()) {
if (m_versionInfo.size() == 0) {
m_versionInfo = m_gc.gitShowReason(m_branchName);
}
GUI() << (ISMAS() << (CONSOLE() << UPDATE_STEP::CLONE_REPOSITORY_SUCCESS));
continueUpdate = true;
m_clone = true;
@ -330,6 +334,11 @@ void Worker::privateUpdate() {
}
}
}
if (m_versionInfo.size() == 0) {
m_versionInfo = m_gc.gitShowReason(m_branchName);
}
CONSOLE() << UPDATE_STEP::CHECK_REPOSITORY_SUCCESS;
setProgress(_CHECKOUT_REPOSITORY_SUCCESS);