浏览代码

git updatelist

qiaofeng1227 2 年之前
父节点
当前提交
030fcb9886
共有 2 个文件被更改,包括 6 次插入4 次删除
  1. 1 1
      appmanage/Dockerfile
  2. 5 3
      appmanage/api/service/manage.py

+ 1 - 1
appmanage/Dockerfile

@@ -10,7 +10,7 @@ COPY static ./static
 COPY requirements.txt main.py  ./
 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

+ 5 - 3
appmanage/api/service/manage.py

@@ -106,6 +106,8 @@ def get_update_list():
     local_version = json.loads(op)['VERSION']
     version_contents = get_github_content(repo, 'install/version.json')
     version = json.loads(version_contents)['VERSION']
+    ret = {}
+    ret['current_version'] = local_version
     if compared_version(local_version, version) == -1:
         content = []
         change_log_contents = get_github_content(repo, 'CHANGELOG.md')
@@ -114,13 +116,13 @@ def get_update_list():
         for change in change_log[1:]:
             if change != '':
                 content.append(change)
-        ret = {}
-        ret['version'] = version
+        
+        ret['latest_version'] = version
         ret['date'] = date
         ret['content'] = content
         return ret
     else:
-        return None
+        return ret
 
 
 def conbine_list(installing_list, installed_list):