自动git pull 并打包前端

This commit is contained in:
caoqianming 2021-11-20 22:33:15 +08:00
parent 23b75df2d4
commit 45117b0916
1 changed files with 4 additions and 0 deletions

View File

@ -63,4 +63,8 @@ class UpdateDevelop(APIView):
# 更新后端 # 更新后端
os.chdir('/home/hberp') os.chdir('/home/hberp')
os.system('git pull https://caoqianming%40ctc.ac.cn:9093qqww@e.coding.net/ctcdevteam/hberp/hberp.git') os.system('git pull https://caoqianming%40ctc.ac.cn:9093qqww@e.coding.net/ctcdevteam/hberp/hberp.git')
# 打包前端
os.chdir('/home/hberp/hb_client')
os.system('npm run build:prod')
os.system('cp /home/hberp/hb_client/dist/* /home/hberp/hb_server/vuedist')
return Response() return Response()