home » zplus/dokk.git
ID: 0c750925363939c77bb93eb05668c0ad5da271d0
37 lines — 807B — View raw


SHELL = /bin/bash

REPOSITORY = https://github.com/biothings/mygeneset.info.git

check_env_vars:
ifdef OUTPUT_PATH
OUTPUT_PATH := ${OUTPUT_PATH}/biothings-mygeneset.info
else
	$(error OUTPUT_PATH is undefined)
endif

venv-3.8:
	export PYENV_VERSION=3.8
	python3 -m venv venv

repository:
	git clone ${REPOSITORY} repository

2023-11-30-a6e751dd: check_env_vars venv-3.8 repository
	# Extract hash id
	commit_hash=$@
	commit_hash=$${commit_hash:11}

	source venv/bin/activate
	cd repository
	git checkout $${commit_hash}
	# Lock dependencies because it won't compile with newer versions
	pip install "sphinx < 4" sphinx_rtd_theme "jinja2 < 3.1"
	cd docs
	make clean dirhtml
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"

.ONESHELL:
.SUFFIXES:
.PHONY:
.DELETE_ON_ERROR: