From bbbbbf535f153c59bffa47b88c54e9f5107aa648 Mon Sep 17 00:00:00 2001 From: saturneric Date: Tue, 3 Dec 2024 14:01:09 +0100 Subject: [PATCH] fix: add more log to version checking --- src/m_ver_check/SoftwareVersion.cpp | 8 ++++++-- src/m_ver_check/VersionCheckTask.cpp | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/m_ver_check/SoftwareVersion.cpp b/src/m_ver_check/SoftwareVersion.cpp index 6c4ccf1..04e3556 100644 --- a/src/m_ver_check/SoftwareVersion.cpp +++ b/src/m_ver_check/SoftwareVersion.cpp @@ -44,8 +44,9 @@ auto SoftwareVersion::NeedUpgrade() const -> bool { GFModuleStrDup(current_version.toUtf8()), GFModuleStrDup(latest_version.toUtf8())))); - FLOG_DEBUG("load done: %1, pre-release: %2, draft: %3", latest_version, - latest_prerelease_version_from_remote, latest_draft_from_remote); + FLOG_DEBUG("remote latest version: %1, pre-release: %2, draft: %3", + latest_version, latest_prerelease_version_from_remote, + latest_draft_from_remote); return !latest_version.isEmpty() && !latest_prerelease_version_from_remote && !latest_draft_from_remote && GFCompareSoftwareVersion(GFModuleStrDup(current_version.toUtf8()), @@ -63,5 +64,8 @@ auto SoftwareVersion::CurrentVersionReleased() const -> bool { auto SoftwareVersion::GitCommitHashMismatch() const -> bool { if (remote_commit_hash_by_tag.isEmpty()) return false; + + FLOG_DEBUG("remote commit hash: %1, local commit hash: %2", + remote_commit_hash_by_tag, local_commit_hash); return remote_commit_hash_by_tag.trimmed() != local_commit_hash.trimmed(); } diff --git a/src/m_ver_check/VersionCheckTask.cpp b/src/m_ver_check/VersionCheckTask.cpp index d9e5d5e..271e932 100644 --- a/src/m_ver_check/VersionCheckTask.cpp +++ b/src/m_ver_check/VersionCheckTask.cpp @@ -179,7 +179,9 @@ void VersionCheckTask::slot_parse_current_tag_info(QNetworkReply* reply) { } auto sha = object["sha"].toString(); - version_meta_data_.remote_commit_hash_by_tag = sha; + version_meta_data_.remote_commit_hash_by_tag = sha.trimmed(); + FLOG_DEBUG("got remote commit hash: %1", + version_meta_data_.remote_commit_hash_by_tag); } void VersionCheckTask::slot_fill_grt_with_version_info(