Skip to content

Commit

Permalink
fix: update checker for nightly version (fix #3080)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Jan 9, 2024
1 parent 924b290 commit c2af666
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/lib/src/updater/program-updater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ void ProgramUpdater::checkForUpdatesDone()
QJsonObject lastRelease = json.object();

#if defined NIGHTLY
QString latest = lastRelease["target_commitish"].toString();
QString current = QString(NIGHTLY_COMMIT);
bool isNew = !current.isEmpty() && latest != current;
static const QRegularExpression regexHead(R"(Head:\**\s*([a-f0-9]{40}))");
const auto match = regexHead.match(lastRelease["body"].toString());
QString latest = match.hasMatch() ? match.captured(1) : lastRelease["target_commitish"].toString();
const QString current = QString(NIGHTLY_COMMIT);
const bool isNew = !current.isEmpty() && latest != current;
latest = latest.left(8);
QString changelog;
#else
Expand Down

0 comments on commit c2af666

Please # to comment.