home » zplus/dokk.git
ID: 9c8af39f52f35b3fe4301ce5049f0f080b7bd1e3
40 lines — 885B — View raw


SHELL = /bin/bash

REPOSITORY = https://github.com/aio-libs/aiohttp-demos.git

check_env_vars:
ifdef OUTPUT_PATH
OUTPUT_PATH := ${OUTPUT_PATH}/aiohttp-demos
else
	$(error OUTPUT_PATH is undefined)
endif

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

repository:
	git clone ${REPOSITORY} repository

# This repo doesn't use tags for releases, therefore we checkout specific commits.
# The date is the commit's date.
# Requires pg_config executable (from libpq-dev)
2024-01-30-17c335ec: check_env_vars venv-3.10 repository
	# Extract commit hash
	commit_hash=$@
	commit_hash=$${commit_hash:11}

	source venv/bin/activate
	cd repository
	git checkout $${commit_hash}
	pip install -r requirements-dev.txt
	cd docs
	make clean
	make dirhtml
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"

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