ID: b0c0168dd9f820a376d6d6661095aaa1f772afb2
37 lines
—
869B —
View raw
| SHELL = /bin/bash
REPOSITORY = https://github.com/easybuilders/easybuild-tutorial.git
check_env_vars:
ifdef OUTPUT_PATH
OUTPUT_PATH := ${OUTPUT_PATH}/easybuild-tutorial
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-04-28-8e6e147c: 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}
# Installation instructions from README
pip install mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-redirects
mkdocs build
cp --recursive site "${OUTPUT_PATH}/$@"
.ONESHELL:
.SUFFIXES:
.PHONY:
.DELETE_ON_ERROR:
|