Add run and open commands to Makefile and refactor all commands
This commit is contained in:
parent
f9d5d93024
commit
d39d2b253f
22
Makefile
22
Makefile
@ -15,20 +15,28 @@ help:
|
||||
|
||||
.PHONY: docs #: Build and serve documentation.
|
||||
docs: print-env
|
||||
@${MKDOCS} ${MKDOCS_OPTION} -f docs/mkdocs.yml
|
||||
@${PYTHON} -m mkdocs ${MKDOCS_OPTION} -f docs/mkdocs.yml
|
||||
|
||||
.PHONY: tests #: Run unit tests.
|
||||
tests:
|
||||
@${UNITTEST} discover -s tests
|
||||
@${PYTHON} -m unittest discover -s tests
|
||||
|
||||
.PHONY: notebooks #: Run jupyter notebooks.
|
||||
notebooks:
|
||||
@${JUPYTER} ${JUPYTER_OPTION}
|
||||
.PHONY: run
|
||||
run:
|
||||
@${PYTHON} -m ankisyncd
|
||||
|
||||
%:
|
||||
@test -f scripts/${*}.sh
|
||||
@${SHELL} scripts/${*}.sh
|
||||
@${BASH} scripts/${*}.sh
|
||||
|
||||
.PHONY: init #: Download Python dependencies.
|
||||
init:
|
||||
@${POETRY} install
|
||||
@${POETRY} install
|
||||
|
||||
.PHONY: notebooks #: Run jupyter notebooks.
|
||||
notebooks:
|
||||
@${PYTHON} -m jupyter ${JUPYTER_OPTION}
|
||||
|
||||
.PHONY: open
|
||||
open:
|
||||
@${OPEN} http://127.0.0.1:27701
|
||||
@ -2,9 +2,8 @@
|
||||
|
||||
## Make
|
||||
POETRY=poetry
|
||||
MKDOCS=poetry run mkdocs
|
||||
JUPYTER=poetry run jupyter
|
||||
UNITTEST=poetry run python -m unittest
|
||||
PYTHON=poetry run python
|
||||
BASH=bash
|
||||
|
||||
## Ankisyncd
|
||||
ANKISYNCD_HOST=0.0.0.0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user