mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 18:35:35 +08:00
refactor: Remove sync of updateinfo
The update info is already automatically fetched from GitHub instead of using the distribution.json from the datastore
This commit is contained in:
@@ -1,25 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"channel": "ALPHA",
|
|
||||||
"restricted": true,
|
|
||||||
"url0": "https:\/\/datastore.swift-project.org\/page\/alpha.html",
|
|
||||||
"url1": null,
|
|
||||||
"url2": null,
|
|
||||||
"url3": null,
|
|
||||||
"url4": null,
|
|
||||||
"platforms": {
|
|
||||||
"linux-64": [
|
|
||||||
"swift-installer-0.7.1-linux-64_2017-01-08_22-17-19.run"
|
|
||||||
],
|
|
||||||
"linux-64-vatsim": [
|
|
||||||
"swift-installer-0.7.3-linux-64_2017-03-13_17-24-46.run"
|
|
||||||
],
|
|
||||||
"win-64-vatsim": [
|
|
||||||
"swift-installer-0.7.3-win-64_2017-03-13_17-25-52.exe"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"id": 1,
|
|
||||||
"tsLastUpdated": "2017-03-30 14:15:51",
|
|
||||||
"tsCreated": "2017-03-25 23:32:52"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
Copyright (C) swift Project Community / Contributors
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
|
|
||||||
@@ -231,17 +231,8 @@ class DbDataSync(BaseSync):
|
|||||||
write_json_to_file(file_path, j, timestamp)
|
write_json_to_file(file_path, j, timestamp)
|
||||||
|
|
||||||
|
|
||||||
class UpdateInfoSync(BaseSync):
|
|
||||||
def __init__(self, host, version, target_path):
|
|
||||||
BaseSync.__init__(self, host, version, target_path)
|
|
||||||
|
|
||||||
def sync(self):
|
|
||||||
self.sync_file('updateinfo', 'distribution.json')
|
|
||||||
|
|
||||||
|
|
||||||
def update_shared(host, version, target_path):
|
def update_shared(host, version, target_path):
|
||||||
DbDataSync(host, version, target_path).sync()
|
DbDataSync(host, version, target_path).sync()
|
||||||
UpdateInfoSync(host, version, target_path).sync()
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@@ -250,7 +241,6 @@ def main():
|
|||||||
target_path = os.path.abspath(os.curdir)
|
target_path = os.path.abspath(os.curdir)
|
||||||
|
|
||||||
DbDataSync(host, version, target_path).sync()
|
DbDataSync(host, version, target_path).sync()
|
||||||
UpdateInfoSync(host, version, target_path).sync()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
@@ -55,11 +55,6 @@ namespace BlackCore::Data
|
|||||||
return m_sharedUrls;
|
return m_sharedUrls;
|
||||||
}
|
}
|
||||||
|
|
||||||
CUrlList CGlobalSetup::getSwiftUpdateInfoFileUrls() const
|
|
||||||
{
|
|
||||||
return getSwiftSharedUrls().withAppendedPath(CGlobalSetup::schemaVersionString() + "/updateinfo/updateinfo.json");
|
|
||||||
}
|
|
||||||
|
|
||||||
CUrl CGlobalSetup::getDbHomePageUrl() const
|
CUrl CGlobalSetup::getDbHomePageUrl() const
|
||||||
{
|
{
|
||||||
return getDbRootDirectoryUrl().withAppendedPath("/page/index.php");
|
return getDbRootDirectoryUrl().withAppendedPath("/page/index.php");
|
||||||
@@ -184,7 +179,7 @@ namespace BlackCore::Data
|
|||||||
QString s =
|
QString s =
|
||||||
u"Global setup loaded: " % separator % u"Mapping min.version: " % this->getMappingMinimumVersionString() % separator
|
u"Global setup loaded: " % separator % u"Mapping min.version: " % this->getMappingMinimumVersionString() % separator
|
||||||
|
|
||||||
% u"Distribution URLs: " % getSwiftUpdateInfoFileUrls().toQString(i18n) % separator % u"Help URLs: " % m_onlineHelpUrls.toQString(i18n) % separator;
|
% u"Help URLs: " % m_onlineHelpUrls.toQString(i18n) % separator;
|
||||||
s +=
|
s +=
|
||||||
u"DB root directory: " % getDbRootDirectoryUrl().toQString(i18n) % separator % u"ICAO DB reader: " % getDbIcaoReaderUrl().toQString(i18n) % separator % u"Model DB reader: " % getDbModelReaderUrl().toQString(i18n) % separator % u"Airport DB reader: " % getDbAirportReaderUrl().toQString(i18n) % separator % u"DB home page: " % getDbHomePageUrl().toQString(i18n) % separator % u"DB login service: " % getDbLoginServiceUrl().toQString(i18n) % separator % u"DB client ping service: " % getDbClientPingServiceUrl().toQString(i18n);
|
u"DB root directory: " % getDbRootDirectoryUrl().toQString(i18n) % separator % u"ICAO DB reader: " % getDbIcaoReaderUrl().toQString(i18n) % separator % u"Model DB reader: " % getDbModelReaderUrl().toQString(i18n) % separator % u"Airport DB reader: " % getDbAirportReaderUrl().toQString(i18n) % separator % u"DB home page: " % getDbHomePageUrl().toQString(i18n) % separator % u"DB login service: " % getDbLoginServiceUrl().toQString(i18n) % separator % u"DB client ping service: " % getDbClientPingServiceUrl().toQString(i18n);
|
||||||
s +=
|
s +=
|
||||||
@@ -218,7 +213,6 @@ namespace BlackCore::Data
|
|||||||
case IndexVatsimServer: return QVariant::fromValue(m_vatsimServerFileUrl);
|
case IndexVatsimServer: return QVariant::fromValue(m_vatsimServerFileUrl);
|
||||||
case IndexVatsimHttpFsd: return QVariant::fromValue(m_vatsimFsdHttpUrl);
|
case IndexVatsimHttpFsd: return QVariant::fromValue(m_vatsimFsdHttpUrl);
|
||||||
case IndexVatsimMetars: return QVariant::fromValue(m_vatsimMetarsUrls);
|
case IndexVatsimMetars: return QVariant::fromValue(m_vatsimMetarsUrls);
|
||||||
case IndexUpdateInfoFileUrls: return QVariant::fromValue(this->getSwiftUpdateInfoFileUrls());
|
|
||||||
case IndexSharedUrls: return QVariant::fromValue(m_sharedUrls);
|
case IndexSharedUrls: return QVariant::fromValue(m_sharedUrls);
|
||||||
case IndexOnlineHelpUrls: return QVariant::fromValue(m_onlineHelpUrls);
|
case IndexOnlineHelpUrls: return QVariant::fromValue(m_onlineHelpUrls);
|
||||||
case IndexCrashReportServerUrl: return QVariant::fromValue(m_crashReportServerUrl);
|
case IndexCrashReportServerUrl: return QVariant::fromValue(m_crashReportServerUrl);
|
||||||
|
|||||||
@@ -44,8 +44,6 @@ namespace BlackCore::Data
|
|||||||
IndexVatsimData,
|
IndexVatsimData,
|
||||||
IndexVatsimServer,
|
IndexVatsimServer,
|
||||||
IndexVatsimHttpFsd,
|
IndexVatsimHttpFsd,
|
||||||
IndexSwiftDbFiles,
|
|
||||||
IndexUpdateInfoFileUrls,
|
|
||||||
IndexOnlineHelpUrls,
|
IndexOnlineHelpUrls,
|
||||||
IndexCrashReportServerUrl,
|
IndexCrashReportServerUrl,
|
||||||
IndexSharedUrls,
|
IndexSharedUrls,
|
||||||
@@ -132,10 +130,6 @@ namespace BlackCore::Data
|
|||||||
//! Shared URLs
|
//! Shared URLs
|
||||||
const BlackMisc::Network::CUrlList &getSwiftSharedUrls() const;
|
const BlackMisc::Network::CUrlList &getSwiftSharedUrls() const;
|
||||||
|
|
||||||
//! Distribution URLs
|
|
||||||
//! \remark based on getSwiftSharedUrls
|
|
||||||
BlackMisc::Network::CUrlList getSwiftUpdateInfoFileUrls() const;
|
|
||||||
|
|
||||||
//! VATSIM METAR URL
|
//! VATSIM METAR URL
|
||||||
const BlackMisc::Network::CUrlList &getVatsimMetarsUrls() const { return m_vatsimMetarsUrls; }
|
const BlackMisc::Network::CUrlList &getVatsimMetarsUrls() const { return m_vatsimMetarsUrls; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user