Skip to content

Commit

Permalink
0.0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonycorletti committed Sep 20, 2023
1 parent 0972adf commit bfa8fa1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion snok/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""snok"""

__version__ = "0.0.15"
__version__ = "0.0.16"
3 changes: 1 addition & 2 deletions snok/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ def _get_snok_path() -> str:

def _run_cmd(
cmd: List[str],
pty: bool = True,
echo: bool = True,
) -> None: # pragma: no cover
ctx = Context()
try:
ctx.run(
" ".join(cmd),
pty=pty,
pty=_check_pty(),
echo=echo,
)
except Exception:
Expand Down
16 changes: 11 additions & 5 deletions tasks.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import sys

from invoke import task
from invoke.context import Context


def _check_pty() -> bool:
return sys.platform not in ["win32", "cygwin", "msys"]


@task
def docs_build(ctx: Context) -> None:
"""docs_build
Expand All @@ -10,22 +16,22 @@ def docs_build(ctx: Context) -> None:
"""
ctx.run(
"mkdocs build",
pty=True,
pty=_check_pty(),
echo=True,
)
ctx.run(
"cp ./docs/index.md ./README.md",
pty=True,
pty=_check_pty(),
echo=True,
)
ctx.run(
"git add ./docs README.md",
pty=True,
pty=_check_pty(),
echo=True,
)
ctx.run(
"git commit -S -m '📚 Updated docs.'",
pty=True,
pty=_check_pty(),
echo=True,
)

Expand All @@ -38,6 +44,6 @@ def docs_serve(ctx: Context) -> None:
"""
ctx.run(
"mkdocs serve --dev-addr 127.0.0.1:8008",
pty=True,
pty=_check_pty(),
echo=True,
)

0 comments on commit bfa8fa1

Please sign in to comment.