mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-02-03 01:28:39 +08:00
not need update appstore check
This commit is contained in:
parent
e808de858f
commit
f2d05cbca3
@ -11,7 +11,7 @@ COPY static ./static
|
||||
COPY requirements.txt main.py database.sqlite ./
|
||||
RUN apt update
|
||||
|
||||
# Install supervisords
|
||||
# Install supervisord
|
||||
RUN apt install -y supervisor
|
||||
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
COPY config/cmd.sh /cmd.sh
|
||||
|
@ -101,7 +101,21 @@ def AppStoreUpdate():
|
||||
raise CommandException(const.ERRORMESSAGE_SERVER_VERSION_NEEDUPGRADE, "You must upgrade websoft9 core", "You must upgrade websoft9 core")
|
||||
elif core_support == "1":
|
||||
raise CommandException(const.ERRORMESSAGE_SERVER_VERSION_NOTSUPPORT, "core not support,can not upgrade", "core not support,can not upgrade")
|
||||
appstore_update()
|
||||
local_path = '/usr/share/cockpit/appstore/appstore.json'
|
||||
local_version = "0"
|
||||
try:
|
||||
op = shell_execute.execute_command_output_all("cat " + local_path)['result']
|
||||
local_version = json.loads(op)['Version']
|
||||
except:
|
||||
local_version = "0.0.0"
|
||||
|
||||
version_cmd = "curl " + const.ARTIFACT_URL + "/plugin/appstore/appstore.json"
|
||||
latest = shell_execute.execute_command_output_all(version_cmd)['result']
|
||||
version = json.loads(latest)['Version']
|
||||
if local_version < version:
|
||||
appstore_update()
|
||||
else:
|
||||
myLogger.info_logger("You click update appstore, but not need to update")
|
||||
|
||||
# 获取 update info
|
||||
def get_update_list():
|
||||
|
Loading…
Reference in New Issue
Block a user