git updatelist

This commit is contained in:
qiaofeng1227 2023-06-19 16:29:41 +08:00
parent fbe77d2cde
commit 030fcb9886
2 changed files with 6 additions and 4 deletions

View File

@ -10,7 +10,7 @@ COPY static ./static
COPY requirements.txt main.py ./ COPY requirements.txt main.py ./
RUN apt update RUN apt update
# Install supervisords # Install supervisord
RUN apt install -y supervisor RUN apt install -y supervisor
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY config/cmd.sh /cmd.sh COPY config/cmd.sh /cmd.sh

View File

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