make -> swydd
This commit is contained in:
parent
ae1dcd14e1
commit
8db8053d23
2 changed files with 18 additions and 5 deletions
5
Makefile
5
Makefile
|
@ -1,5 +0,0 @@
|
|||
build: ## build the image!
|
||||
podman build . -t daylinbox
|
||||
|
||||
-include .task.mk
|
||||
$(if $(filter help,$(MAKECMDGOALS)),$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v2024.1001/task.mk -o .task.mk))
|
18
tasks.py
Executable file
18
tasks.py
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
if not (
|
||||
(_i := __import__)("importlib.util").util.find_spec("swydd")
|
||||
or (_src := _i("pathlib").Path(__file__).parent / "swydd/__init__.py").is_file()
|
||||
): # noqa | https://github.com/daylinmorgan/swydd?tab=readme-ov-file#automagic-snippet
|
||||
_r = _i("urllib.request").request.urlopen("https://swydd.dayl.in/swydd.py")
|
||||
_src.parent.mkdir(exist_ok=True)
|
||||
_src.write_text(_r.read().decode())
|
||||
|
||||
from swydd import task, sub, cli
|
||||
|
||||
@task
|
||||
def build(args: str = ""):
|
||||
"""build the image"""
|
||||
sub("podman build . -t daylinbox " + args)
|
||||
|
||||
cli()
|
Loading…
Reference in a new issue