安装
pip install invoke
代码实例
tasks.py
# -*- coding: utf-8 -*- from invoke import task @task def hello(c): print("Hello world!") @task def greet(c, name): c.run(f"echo hi {name}")
运行
$ inv -l $ inv hello $ inv greet -n Tom
安装
pip install invoke
tasks.py
# -*- coding: utf-8 -*- from invoke import task @task def hello(c): print("Hello world!") @task def greet(c, name): c.run(f"echo hi {name}")
运行
$ inv -l $ inv hello $ inv greet -n Tom