improve SPUG_RELEASE

pull/330/head
vapao 2021-04-26 18:00:30 +08:00
parent 54d5649663
commit 19f5ba5cfb
1 changed files with 3 additions and 0 deletions

View File

@ -82,6 +82,9 @@ def _ext2_deploy(req, helper, env):
host_actions = json.loads(extend.host_actions)
server_actions = json.loads(extend.server_actions)
env.update({'SPUG_RELEASE': req.version})
if req.version:
for index, value in enumerate(req.version.split()):
env.update({f'SPUG_RELEASE_{index + 1}': value})
for action in server_actions:
helper.send_step('local', step, f'{human_time()} {action["title"]}...\r\n')
helper.local(f'cd /tmp && {action["data"]}', env)