Skip to content

Instantly share code, notes, and snippets.

@JeroenPeterBos
Last active September 24, 2023 13:25
Show Gist options
  • Save JeroenPeterBos/2a41b72e1e7fa7e457bf1c1e286240a2 to your computer and use it in GitHub Desktop.
Save JeroenPeterBos/2a41b72e1e7fa7e457bf1c1e286240a2 to your computer and use it in GitHub Desktop.
Makefile - Auto Documentation Magic
.PHONY: help
.DEFAULT_GOAL := help
COMMAND_TEXT_WIDTH=17
help: ## Show this help message
@printf "\n\033[1;31mProject Maintenance Commands\033[0m\n\n"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m %-${COMMAND_TEXT_WIDTH}s \033[0m %s\n", $$1, $$2}'
@printf "\n"
CONDA_EXE ?= conda # To use mamba add `export CONDA_EXE=mamba` to your `~/.zshrc` file
install: ## (re)Create the conda environment using the environment.yml spec
$(CONDA_EXE) env create --file environment.yml --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment