Skip to content

Commit

Permalink
Updater: Rudimentary support for beta channel
Browse files Browse the repository at this point in the history
So we can get people update from our alpha to the beta and rc
  • Loading branch information
guruz authored and rullzer committed Oct 5, 2017
1 parent d59c146 commit 3611733
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/gui/updater/updater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ QUrl Updater::addQueryParams(const QUrl &url)
paramUrl.addQueryItem(QLatin1String("version"), clientVersion());
paramUrl.addQueryItem(QLatin1String("platform"), platform);
paramUrl.addQueryItem(QLatin1String("oem"), theme->appName());

QString suffix = QString::fromLatin1(MIRALL_STRINGIFY(MIRALL_VERSION_SUFFIX));
paramUrl.addQueryItem(QLatin1String("versionsuffix"), suffix);
if (suffix.startsWith("nightly")
|| suffix.startsWith("alpha")
|| suffix.startsWith("rc")
|| suffix.startsWith("beta")) {
paramUrl.addQueryItem(QLatin1String("channel"), "beta");
// FIXME: Provide a checkbox in UI to enable regular versions to switch
// to beta channel
}

return paramUrl;
}

Expand Down
2 changes: 2 additions & 0 deletions version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#define MIRALL_VERSION_PATCH @MIRALL_VERSION_PATCH@
#define MIRALL_VERSION_BUILD @MIRALL_VERSION_BUILD@

#define MIRALL_VERSION_SUFFIX @MIRALL_VERSION_SUFFIX@

#define MIRALL_VERSION @MIRALL_VERSION@
#define MIRALL_VERSION_FULL @MIRALL_VERSION_FULL@

Expand Down

0 comments on commit 3611733

Please sign in to comment.