From dd63077c8b269a4020db83e36b2061a2e92ad90e Mon Sep 17 00:00:00 2001 From: vapao Date: Wed, 20 May 2020 19:00:45 +0800 Subject: [PATCH] =?UTF-8?q?U=20=E6=94=B9=E8=BF=9Bupdate=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_api/apps/account/management/commands/update.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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'''))