-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
45 lines (32 loc) · 1.4 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
33
34
35
36
37
38
39
40
41
42
43
44
45
#
# Makefile
defaut: help
install: wandbox/*.py ## install self
python -m pip install .
install-test-deps: ## install test dependencies
pip install -e.[test]
test: install ## commands test
make -C samples/command
pytest: ## python test
python setup.py test
tox: install-test-deps ## run tox
tox .
flake8: install-test-deps ## run tox flake8 only
tox -e flake8 .
help: ## Display this help screen
@grep -E '^[a-zA-Z][a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sed -e 's/^GNUmakefile://' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
docker-build: ## build development docker image
docker build -t wandbox-api-dev .
docker-run: ## run development docker container
docker run -it --rm -v ${PWD}:/work -w /work wandbox-api-dev bash
docker-alpine: ## run python alpine container
docker run -it --rm -v ${PWD}:/work -w /work python:3.8-alpine sh
# apk add make
pyenv-versions:
pyenv versions | grep -v system | grep -o "3\.5\.[0-9a-z]*" | tail -1 > .python-version
pyenv versions | grep -v system | grep -o "3\.6\.[0-9a-z]*" | tail -1 >> .python-version
pyenv versions | grep -v system | grep -o "3\.7\.[0-9a-z]*" | tail -1 >> .python-version
pyenv versions | grep -v system | grep -o "3\.8\.[0-9a-z]*" | tail -1 >> .python-version
pyenv versions | grep -v system | grep -o "3\.9\.[0-9a-z]*" | tail -1 >> .python-version
clean: ## clean workspace
rm -rf .python-version