Skip to content

Commit 7dabfdc

Browse files
authored
Fix make from fresh clone (#130)
* Fix make from fresh clone * Remove variable definition (it's not an env var) * Remove quotes from Makefile target
1 parent 2442c28 commit 7dabfdc

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ _GID ?= 10001
66

77
VENV := $(shell echo $${VIRTUAL_ENV-.venv})
88
INSTALL_STAMP = $(VENV)/.install.stamp
9-
DOTENV_FILE = ".env"
10-
POETRY_VIRTUALENVS_IN_PROJECT = true
9+
DOTENV_FILE = .env
1110

1211
.PHONY: help
1312
help:
@@ -16,6 +15,7 @@ help:
1615
@echo "JBI make rules:"
1716
@echo ""
1817
@echo "Local"
18+
@echo " clean - clean local cache folders"
1919
@echo " format - run formatters (black, isort), fix in place"
2020
@echo " lint - run linters"
2121
@echo " start - run the API service locally"
@@ -28,10 +28,16 @@ help:
2828
@echo ""
2929
@echo " help - see this text"
3030

31+
.PHONY: clean
32+
clean:
33+
find . -name "__pycache__" | xargs rm -rf
34+
rm -rf .mypy_cache .pytest_cache .coverage .venv
35+
36+
3137
install: $(INSTALL_STAMP)
3238
$(INSTALL_STAMP): poetry.lock
3339
@if [ -z $(shell command -v poetry 2> /dev/null) ]; then echo "Poetry could not be found. See https://python-poetry.org/docs/"; exit 2; fi
34-
poetry install --no-root
40+
POETRY_VIRTUALENVS_IN_PROJECT=1 poetry install --no-root
3541
touch $(INSTALL_STAMP)
3642

3743
.PHONY: build
@@ -53,7 +59,7 @@ start: $(INSTALL_STAMP) $(DOTENV_FILE)
5359
poetry run python -m src.app.api
5460

5561
$(DOTENV_FILE):
56-
cp -n .env.example $(DOTENV_FILE)
62+
cp .env.example $(DOTENV_FILE)
5763

5864
.PHONY: docker-shell
5965
docker-shell: $(DOTENV_FILE)

0 commit comments

Comments
 (0)