-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
32 lines (23 loc) · 1.09 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.DEFAULT_GOAL := help
.PHONY := help view-docs test
SHELL=/bin/bash
pipenv_python ?= python3
pipenv = "`pipenv --venv`"
pipenv_bin = "$(pipenv)/bin"
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
install: ## Installs project dependencies into pipenv
@pipenv --venv || (pipenv --python $(pipenv_python); pipenv install -e .[all])
documentation: install ## Builds the currently available documentation.
@cp README.rst docs/source/introduction.rst
@cp CHANGELOG.rst docs/source/changelog.rst
@pipenv run sphinx-build -b html docs/source docs/
view-docs: port=8000
view-docs: documentation ## Launches a Python HTTP server to view docs
@$(pipenv_bin)/python -m http.server --bind 0.0.0.0 --dir docs $(port)
test: install ## Runs project unit tests
@$(pipenv_bin)/python -m unittest enummodel.tests
# upload-dist: test ## Builds and uploads distribution
upload-dist: install ## Builds and uploads distribution
curl -XGET https://packages.wdt.pdx.edu/publish.sh | VENV=$(pipenv) bash -
rm dist/*.whl