Created
July 30, 2024 00:02
-
-
Save GaryLee/030aa2fd36db22e813784bc14c2ae604 to your computer and use it in GitHub Desktop.
An example showing how to use invoke as standalone program.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python | |
# coding: utf-8 | |
from invoke import task, Program | |
@task | |
def task1(c): | |
c.run("Put your first task command here.") | |
@task | |
def task2(c, arg1, arg2): | |
c.run(f"Put your second task command here. {arg1=}, {arg2=}") | |
if __name__ == '__main__': | |
Program(version="1.0").run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment