From ef51dc032b8720b490e6b8c5fcacfc6fb5ae7bf2 Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Thu, 27 Jul 2023 09:43:19 +0800 Subject: [PATCH] 0.8.8 --- CHANGELOG.md | 4 ++++ appmanage/api/service/manage.py | 10 +++++----- appmanage/api/utils/const.py | 1 + appmanage/api/v1/routers/apps.py | 6 +++--- changelog_latest.md | 2 +- docker/w9appmanage/.env | 2 +- version.json | 4 ++-- 7 files changed, 17 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c884c727..5d10c91b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.8.8 release on 2023-07-27 + +fixed update search api bug + ## 0.8.5 release on 2023-07-26 add docs diff --git a/appmanage/api/service/manage.py b/appmanage/api/service/manage.py index 1ba16dd0..e455f2f2 100644 --- a/appmanage/api/service/manage.py +++ b/appmanage/api/service/manage.py @@ -41,14 +41,14 @@ def appstore_update(): # 当点击appstore升级时,是无条件升级,不需要做版本的判定 download_url = const.ARTIFACT_URL + "/plugin/appstore/appstore-latest.zip" - cmd = "cd /opt && wget " + download_url + " && unzip appstore-latest.zip " + cmd = "cd /opt && rm -rf /opt/appstore* && wget " + download_url + " && unzip appstore-latest.zip " shell_execute.execute_command_output_all(cmd) - shell_execute.execute_command_output_all("rm -rf /usr/share/cockpit/appstore && cp /opt/appstore /usr/share/cockpit") + shell_execute.execute_command_output_all("rm -rf /usr/share/cockpit/appstore && cp -r /opt/appstore /usr/share/cockpit") shell_execute.execute_command_output_all("rm -rf /opt/appstore*") library_url = const.ARTIFACT_URL + "/plugin/library/library-latest.zip" - library_cmd = "cd /opt && wget " + library_url + " && unzip library-latest.zip " + library_cmd = "cd /opt && rm -rf /opt/library* && wget " + library_url + " && unzip library-latest.zip " shell_execute.execute_command_output_all(library_cmd) shell_execute.execute_command_output_all("rm -rf /data/library && cp -r /opt/library /data") shell_execute.execute_command_output_all("rm -rf /opt/library*") @@ -98,7 +98,7 @@ def AppStoreUpdate(): core_support = AppStoreCore() if core_support == "-1": - raise CommandException(const.ERRORMESSAGE_SERVER_VERSION_NOTSUPPORT, "You must upgrade websoft9 core", "You must upgrade websoft9 core") + 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() @@ -119,7 +119,7 @@ def get_update_list(): ret['local_version'] = local_version ret['target_version'] = version content = [] - cmd = "curl" + const.ARTIFACT_URL + "/CHANGELOG.md" + cmd = "curl " + const.ARTIFACT_URL + "/CHANGELOG.md" change_log_contents = shell_execute.execute_command_output_all(cmd)['result'] change_log = change_log_contents.split('## ')[1].split('\n') date = change_log[0].split()[-1] diff --git a/appmanage/api/utils/const.py b/appmanage/api/utils/const.py index 81924d29..4cd6c760 100644 --- a/appmanage/api/utils/const.py +++ b/appmanage/api/utils/const.py @@ -19,6 +19,7 @@ ERRORMESSAGE_SERVER_COMMAND="Server.Container.Error" ERRORMESSAGE_SERVER_SYSTEM="Server.SystemError" ERRORMESSAGE_SERVER_RESOURCE="Server.ResourceError" ERRORMESSAGE_SERVER_VERSION_NOTSUPPORT="Server.Version.NotSupport" +ERRORMESSAGE_SERVER_VERSION_NEEDUPGRADE="Server.Version.NeedUpgradeCore" # 应用状态定义 # 应用启动中 installing diff --git a/appmanage/api/v1/routers/apps.py b/appmanage/api/v1/routers/apps.py index 98c11c13..b68c6875 100644 --- a/appmanage/api/v1/routers/apps.py +++ b/appmanage/api/v1/routers/apps.py @@ -52,13 +52,13 @@ domain = "  Domain_set:{\n\n" \ "    domains:域名列表\n\n" \ "    default_domain:默认域名\n\n  }\n\n}\n\n" -update = "  Compare_content: 内容比较{\n\n" \ +update = "  Compare_content: 内容比较 {\n\n" \ "    local_version: 当前版本,\n\n" \ - "    &target_version: 最新版本\n\n" \ + "    target_version: 最新版本\n\n" \ "    content: 更新内容\n\n" \ "    date: 更新日期\n\n" \ "    update: 是否有更新\n\n" \ - "    core_compare: 是否支持升级(-1:需要升级内核 0:可以升级 1:无法支持)\n\n    }\n\n" + "    core_compare: 是否支持升级(-1:需要升级内核 0:可以升级 1:无法支持)\n\n    }\n\n}\n\n" appstore_update = "  Update_flag: 更新结果(成功或失败)\n\n}\n\n" auto = "  auto_update: 目前的自动更新状态\n\n}\n\n" diff --git a/changelog_latest.md b/changelog_latest.md index 9ea6ea74..7b7ea221 100644 --- a/changelog_latest.md +++ b/changelog_latest.md @@ -1 +1 @@ -新增接口 docs 文档:appstore 更新信息查询 +fixed update search api bug diff --git a/docker/w9appmanage/.env b/docker/w9appmanage/.env index 4adeb39b..bca29078 100644 --- a/docker/w9appmanage/.env +++ b/docker/w9appmanage/.env @@ -1,4 +1,4 @@ APP_NAME=websoft9-appmanage -APP_VERSION=0.8.5 +APP_VERSION=0.8.8 APP_HTTP_PORT=5000 APP_NETWORK=websoft9 diff --git a/version.json b/version.json index 330a2b18..ff004db5 100644 --- a/version.json +++ b/version.json @@ -2,7 +2,7 @@ "SERVICES": { "PORTAINER": "2.18.3", "NGINX": "2.10.3", - "APPMANAGE": "0.8.5", + "APPMANAGE": "0.8.8", "REDIS": "7.0.11" }, "PLUGINS": { @@ -39,5 +39,5 @@ "18.04" ] }, - "VERSION": "0.8.5" + "VERSION": "0.8.8" } \ No newline at end of file