Updater: Rudimentary support for beta channel

So we can get people update from our alpha to the beta and rc
This commit is contained in:
Markus Goetz 2017-09-23 13:48:48 +02:00 committed by Roeland Jago Douma
parent d59c146488
commit 36117336e7
No known key found for this signature in database
GPG key ID: F941078878347C0C
2 changed files with 14 additions and 0 deletions

View file

@ -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;
}

View file

@ -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@