diff --git a/spug_api/apps/account/management/commands/update.py b/spug_api/apps/account/management/commands/update.py index f840eb6..f6558bc 100644 --- a/spug_api/apps/account/management/commands/update.py +++ b/spug_api/apps/account/management/commands/update.py @@ -37,7 +37,7 @@ class Command(BaseCommand): # update api commands = [ f'cd {settings.BASE_DIR}', - 'git fetch --tags', + f'git fetch origin refs/tags/{version}:refs/tags/{version} --no-tags', f'git checkout {version}' ] task = subprocess.Popen(' && '.join(commands), shell=True) @@ -59,5 +59,6 @@ class Command(BaseCommand): call_command('migrate') self.stdout.write(self.style.SUCCESS('''升级成功,请自行重启服务,如果通过官方文档安装一般重启命令为 + Docker: docker restart $CONTAINER_ID Centos: systemctl restart supervisord Ubuntu: systemctl restart supervisor'''))