from fabric.api import *
@task()
def pi_test():
run('VAR1=hehe')
run('echo $VAR1')
[[email protected]] Executing task 'pi_test'
[[email protected]] run: VAR1=hehe
[[email protected]] run: echo $VAR1
[[email protected]] out:
[[email protected]] out:
Done.
请问怎么才能让 run('echo $VAR1')
成功输出 hehe
来,可以做到吗?
1
zz1956 2016-09-13 19:46:55 +08:00
|
2
hanks315 2016-09-13 20:14:48 +08:00 via iPhone
|
3
laoyur OP |
4
siteshen 2016-09-14 13:53:18 +08:00
def hehe():
with prefix('VAR1=hehe'): run('echo $VAR1') |
5
zonghua 2016-09-18 15:47:54 +08:00
没什么经验,结果我在 Java 的工程里也用 fabric 去部署
|