fix: add more log to version checking

This commit is contained in:
saturneric 2024-12-03 14:01:09 +01:00
parent ec7541da65
commit bbbbbf535f
2 changed files with 9 additions and 3 deletions

View File

@ -44,8 +44,9 @@ auto SoftwareVersion::NeedUpgrade() const -> bool {
GFModuleStrDup(current_version.toUtf8()), GFModuleStrDup(current_version.toUtf8()),
GFModuleStrDup(latest_version.toUtf8())))); GFModuleStrDup(latest_version.toUtf8()))));
FLOG_DEBUG("load done: %1, pre-release: %2, draft: %3", latest_version, FLOG_DEBUG("remote latest version: %1, pre-release: %2, draft: %3",
latest_prerelease_version_from_remote, latest_draft_from_remote); latest_version, latest_prerelease_version_from_remote,
latest_draft_from_remote);
return !latest_version.isEmpty() && !latest_prerelease_version_from_remote && return !latest_version.isEmpty() && !latest_prerelease_version_from_remote &&
!latest_draft_from_remote && !latest_draft_from_remote &&
GFCompareSoftwareVersion(GFModuleStrDup(current_version.toUtf8()), GFCompareSoftwareVersion(GFModuleStrDup(current_version.toUtf8()),
@ -63,5 +64,8 @@ auto SoftwareVersion::CurrentVersionReleased() const -> bool {
auto SoftwareVersion::GitCommitHashMismatch() const -> bool { auto SoftwareVersion::GitCommitHashMismatch() const -> bool {
if (remote_commit_hash_by_tag.isEmpty()) return false; 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(); return remote_commit_hash_by_tag.trimmed() != local_commit_hash.trimmed();
} }

View File

@ -179,7 +179,9 @@ void VersionCheckTask::slot_parse_current_tag_info(QNetworkReply* reply) {
} }
auto sha = object["sha"].toString(); 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( void VersionCheckTask::slot_fill_grt_with_version_info(