home » zplus/dokk.git
ID: d055fadf69fe009cd601ce018e97310e52bf402e
36 lines — 738B — View raw


SHELL = /bin/bash

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

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

venv-2.7:
	export PYENV_VERSION=2.7
	pyenv virtualenv $$PYENV_VERSION venv

repository:
	git clone ${REPOSITORY} repository

2023-11-28-38d67e0d: check_env_vars venv-2.7 repository
	# Extract hash id
	commit_hash=$@
	commit_hash=$${commit_hash:11}

	source ~/.pyenv/versions/venv/bin/activate
	cd repository
	git checkout $${commit_hash}
	pip install sphinx
	cd docs
	make clean dirhtml
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"

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