Skip to content

Commit

Permalink
make lock-docker upgrade-docker
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdemin committed Nov 23, 2022
1 parent 719fa63 commit 0a15f68
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*.py[cod]
/.env/
/.venv*/

# C extensions
*.so
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM ubuntu:20.04

RUN apt-get update -y && apt-get install -y python3.8-venv make

WORKDIR /pcm
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ sync: requirements/local.hash virtual_env_set
pip-sync requirements/local.hash
pip install -e . --no-deps

.PHONY: %-docker
%-docker: ## Could be lock-docker or upgrade-docker
docker run --rm -it -v $(PWD):/pcm $$(docker build -q .) /usr/bin/make $*-ubuntu

.PHONY: %-ubuntu
%-ubuntu: .venv38
.venv38/bin/python3 -m pip install tox
.venv38/bin/python3 -m tox -e $*

.venv38:
python3.8 -m venv .venv38

.PHONY: lock
lock: virtual_env_set
tox -e lock
Expand All @@ -31,6 +43,7 @@ test:
.PHONY: clean
clean:
rm -rf build dist pip-compile-multi.egg-info docs/_build
rm -rf .venv38
find . -name "*.pyc" -delete
find * -type d -name '__pycache__' | xargs rm -rf

Expand Down

0 comments on commit 0a15f68

Please sign in to comment.