Skip to content

Commit

Permalink
docs: improve Makefile UX with pipenv sync
Browse files Browse the repository at this point in the history
Include 'pipenv sync' in the 'pipenv' make target to get the behaviour
documented in the README.

Also adds an `exec` to the 'shell' target to avoid an error from make when
the shell exits. Also, no need to keep make running during a shell session.

Signed-off-by: Timo Beckers <[email protected]>
  • Loading branch information
ti-mo committed Oct 19, 2023
1 parent 8d9fd33 commit c42caeb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ preview: pipenv
pipenv run mkdocs serve

shell: pipenv
pipenv shell
@echo "pipenv shell"
@exec pipenv shell

pipenv:
ifeq (, $(shell command -v pipenv 2> /dev/null))
$(error "pipenv is not installed, exiting..")
endif

@# Ensure a venv and install dependencies from Pipfile.lock. Buffer stdio
@# and display it on error as pipenv uses stdin and stderr arbitrarily.
@echo "pipenv sync"
@out=`pipenv sync 2>&1` || echo "$${out}"

.PHONY: pipenv

0 comments on commit c42caeb

Please sign in to comment.