build: refactor bootstrapping

This commit is contained in:
Daylin Morgan 2022-09-22 10:49:14 -05:00
parent 234e3cee35
commit bcb07718fd

View file

@ -1,18 +1,19 @@
VERSION ?= $(shell git describe --tags --always --dirty | sed s'/dirty/dev/') VERSION ?= $(shell git describe --tags --always --dirty | sed s'/dirty/dev/')
TEMPLATES := $(shell find src/ -type f) TEMPLATES := $(shell find src/ -type f)
.DEFAULT_GOAL := help .DEFAULT_GOAL := help
SHELL := /bin/zsh
INHERIT_SHELL = true
msg = $(if $(tprint),$(call tprint,{a.bold}==> {a.magenta}$(1){a.end}),@echo '==> $(1)') msg = $(if $(tprint),$(call tprint,{a.bold}==> {a.magenta}$(1){a.end}),@echo '==> $(1)')
### task.mk development | args: -d -ms b_green --align center ### task.mk development | args: -d -ms b_green --align center
## bootstrap | generate local dev environment ## bootstrap | generate local dev environment
.PHONY: bootstrap .PHONY: bootstrap env hooks
bootstrap: bootstrap: env hooks
$(call msg,Bootstrap Environment) env:
$(call msg,Bootstrapping Environment)
@mamba create -p ./env python jinja2 black -y @mamba create -p ./env python jinja2 black -y
@mamba run -p ./env pip install yartsu @mamba run -p ./env pip install yartsu
hooks:
@git config core.hooksPath .githooks @git config core.hooksPath .githooks
## l, lint | lint the python ## l, lint | lint the python