added invoke task to help wrap core-cli
This commit is contained in:
parent
80eaa27469
commit
d0e9cee650
2 changed files with 27 additions and 0 deletions
|
@ -61,3 +61,21 @@ Example running the core-daemon task from the root of the repo:
|
||||||
```shell
|
```shell
|
||||||
inv daemon
|
inv daemon
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Some tasks are wrappers around command line tools and requires running
|
||||||
|
them with a slight variation for compatibility. You can enter the
|
||||||
|
poetry shell to run the script natively.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# running core-cli as a task requires all options to be provided
|
||||||
|
# within a string
|
||||||
|
inv cli "query session -i 1"
|
||||||
|
|
||||||
|
# entering the poetry shell to use core-cli natively
|
||||||
|
cd $REPO/daemon
|
||||||
|
poetry shell
|
||||||
|
core-cli query session -i 1
|
||||||
|
|
||||||
|
# exit the shell
|
||||||
|
exit
|
||||||
|
```
|
||||||
|
|
9
tasks.py
9
tasks.py
|
@ -205,6 +205,15 @@ def gui(c):
|
||||||
c.run("poetry run scripts/core-pygui", pty=True)
|
c.run("poetry run scripts/core-pygui", pty=True)
|
||||||
|
|
||||||
|
|
||||||
|
@task
|
||||||
|
def cli(c, args):
|
||||||
|
"""
|
||||||
|
run core-cli used to query and modify a running session
|
||||||
|
"""
|
||||||
|
with c.cd(DAEMON_DIR):
|
||||||
|
c.run(f"poetry run scripts/core-cli {args}", pty=True)
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def cleanup(c):
|
def cleanup(c):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue