2020-12-19 20:19:06 +01:00
|
|
|
SHELL := /bin/bash
|
|
|
|
|
|
|
|
all: help
|
|
|
|
|
|
|
|
help:
|
|
|
|
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9 -]+:.*?## / {printf "\033[36m%-22s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
|
|
|
|
|
|
|
check-poetry:
|
|
|
|
@if [[ "$(shell poetry --version 2>/dev/null)" == *"Poetry"* ]] ; \
|
|
|
|
then \
|
|
|
|
echo "Poetry found, ok." ; \
|
|
|
|
else \
|
|
|
|
echo 'Please install poetry first, with e.g.:' ; \
|
|
|
|
echo 'make install-poetry' ; \
|
|
|
|
exit 1 ; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
install-poetry: ## install or update poetry
|
2020-12-29 10:12:46 +01:00
|
|
|
pip3 install -U pip
|
2020-12-19 20:19:06 +01:00
|
|
|
pip3 install -U poetry
|
|
|
|
|
2020-12-22 18:45:12 +01:00
|
|
|
install: check-poetry ## install project via poetry
|
2020-12-19 20:19:06 +01:00
|
|
|
poetry install
|
|
|
|
|
2020-12-29 12:52:44 +01:00
|
|
|
update: install-poetry ## update the sources and installation and generate "conf/requirements.txt"
|
|
|
|
poetry run pip install -U pip
|
2020-12-19 20:19:06 +01:00
|
|
|
poetry update
|
2020-12-29 10:12:46 +01:00
|
|
|
poetry export -f requirements.txt --output conf/requirements.txt
|
2020-12-19 20:19:06 +01:00
|
|
|
|
2020-12-22 18:45:12 +01:00
|
|
|
local-test: check-poetry ## Run local_test.py to run the project locally
|
2020-12-19 20:19:06 +01:00
|
|
|
poetry run ./local_test.py
|
|
|
|
|
|
|
|
local-diff-settings: ## Run "manage.py diffsettings" with local test
|
|
|
|
poetry run python3 local_test/opt_yunohost/manage.py diffsettings
|
|
|
|
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
.PHONY: help check-poetry install-poetry install update local-test
|