Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

export PATH := ${HOME}/.local/bin:$(PATH)

IS_POETRY := $(shell pip freeze | grep "poetry==")
IS_POETRY := $(shell command -v poetry 2>/dev/null)

CURRENT_VERSION := $(shell poetry version -s)

Expand All @@ -25,7 +25,14 @@ help:


.install-poetry:
@if [ -z ${IS_POETRY} ]; then pip install poetry; fi
ifdef IS_POETRY
@:
else
ifndef VIRTUAL_ENV
$(error Please activate a virtual environment or install poetry globally with your preffered tool)
endif
@pip install poetry
endif

update: .install-poetry
poetry update
Expand Down