Use new updates.json

Some notable changes:
* Direct links. This will allow upload updates as release asset, which is faster.
* Minify JSON on publish, pretty-printed JSON in repo. This will make work with JSON files easier, while users will still have minified versions.
This commit is contained in:
Eric Kotato 2021-04-17 14:35:50 +03:00
parent 6cba1d1b65
commit 3fa2e6ae8b

View file

@ -613,7 +613,7 @@ HttpChecker::HttpChecker(bool testing) : Checker(testing) {
void HttpChecker::start() {
const auto path = Local::readAutoupdatePrefix()
+ qstr("/current");
+ qstr("/updates.json");
auto url = QUrl(path);
DEBUG_LOG(("Update Info: requesting update state"));
const auto request = QNetworkRequest(url);
@ -726,7 +726,7 @@ std::optional<QString> HttpChecker::parseResponse(
return validateLatestUrl(
bestAvailableVersion,
bestIsAvailableAlpha,
Local::readAutoupdatePrefix() + bestLink);
bestLink);
}
QString HttpChecker::validateLatestUrl(