SHELL = /bin/bash REPOSITORY = https://github.com/easybuilders/easybuild-docs.git check_env_vars: ifdef OUTPUT_PATH OUTPUT_PATH := ${OUTPUT_PATH}/easybuild else $(error OUTPUT_PATH is undefined) endif venv: python3 -m venv venv repository: git clone ${REPOSITORY} repository # This repo doesn't have any tags, therefore we checkout specific commits. # The date is the commit's date. 2023-10-29-4b663dfc: check_env_vars venv repository # Extract hash id commit_hash=$@ commit_hash=$${commit_hash:11} mkdir --parents "${OUTPUT_PATH}" source venv/bin/activate cd repository git checkout $${commit_hash} pip install -r requirements.txt mkdocs build cp --recursive site "${OUTPUT_PATH}/$@" .ONESHELL: .SUFFIXES: .PHONY: .DELETE_ON_ERROR: