Skip to content

Instantly share code, notes, and snippets.

@GaryLee
Created July 30, 2024 00:02
Show Gist options
  • Save GaryLee/030aa2fd36db22e813784bc14c2ae604 to your computer and use it in GitHub Desktop.
Save GaryLee/030aa2fd36db22e813784bc14c2ae604 to your computer and use it in GitHub Desktop.
An example showing how to use invoke as standalone program.
#!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