SHELL = /bin/bash REPOSITORY = https://github.com/django-hijack/django-hijack.git check_env_vars: ifdef OUTPUT_PATH OUTPUT_PATH := ${OUTPUT_PATH}/django-hijack else $(error OUTPUT_PATH is undefined) endif venv-3.10: export PYENV_VERSION=3.10 python3 -m venv venv repository: git clone ${REPOSITORY} repository 3.4.5: check_env_vars venv-3.10 repository source venv/bin/activate cd repository git checkout tags/$@ pip install -r requirements.txt mkdir --parents "${OUTPUT_PATH}" mkdocs build --site-dir "${OUTPUT_PATH}/$@" # The mkdocs.yml file is in docs/ but for some reasons it's only building the documentation # correctly when compiling from the root folder, that's why we copy docs/mkdocs.yml before # building the docs 2.3.0: check_env_vars venv-3.10 repository source venv/bin/activate cd repository git checkout tags/$@ pip install -r requirements.txt "mkdocs < 1.3" mkdir --parents "${OUTPUT_PATH}" cp docs/mkdocs.yml . mkdocs build --site-dir "${OUTPUT_PATH}/$@" .ONESHELL: .SUFFIXES: .PHONY: .DELETE_ON_ERROR: