2022-08-01 16:34:13 -05:00
|
|
|
.PHONY: lint lint.py lint.sh
|
2022-07-29 09:44:46 -05:00
|
|
|
|
2022-09-02 16:05:16 -05:00
|
|
|
## lint | lint.*
|
2022-08-01 16:34:13 -05:00
|
|
|
lint: lint.py lint.sh
|
|
|
|
|
2022-09-02 16:05:16 -05:00
|
|
|
## lint.python | lint python files
|
2022-08-01 16:34:13 -05:00
|
|
|
lint.python:
|
2022-07-29 09:44:46 -05:00
|
|
|
black $(shell find -type f -name "*.py")
|
2022-09-02 16:05:16 -05:00
|
|
|
|
|
|
|
## lint.sh | lint shell files
|
2022-08-01 16:34:13 -05:00
|
|
|
lint.sh:
|
|
|
|
shfmt -s -w $(shell shfmt -f .)
|
2022-07-29 09:44:46 -05:00
|
|
|
|
2022-09-02 16:05:16 -05:00
|
|
|
.PHONY: $(addprefix d-,b r build run)
|
|
|
|
|
|
|
|
## db, d-build | build docker image
|
|
|
|
db d-build:
|
|
|
|
docker build -f docker/Dockerfile -t dots .
|
|
|
|
|
|
|
|
## dr, d-run | run docker image
|
|
|
|
dr d-run:
|
|
|
|
docker run --rm -it dots
|
|
|
|
|
|
|
|
.PHONY: dr-keep
|
|
|
|
dr-keep:
|
|
|
|
docker run -it dots
|
|
|
|
|
|
|
|
.DEFAULT_GOAL := help
|
|
|
|
# ## h, help | show this help
|
|
|
|
# .PHONY: help h
|
|
|
|
# help h: Makefile
|
|
|
|
# @awk -v fill=$(shell sed -n 's/^## \(.*\) | .*/\1/p' $< | wc -L)\
|
|
|
|
# 'match($$0,/^## (.*) \|/,name) && match($$0,/\| (.*)$$/,help)\
|
|
|
|
# {printf "\033[1;93m%*s\033[0m | \033[30m%s\033[0m\n",\
|
|
|
|
# fill,name[1],help[1];} match($$0,/^### (.*)/,str) \
|
|
|
|
# {printf "%*s \033[30m%s\033[0m\n",fill," ",str[1];}' $<
|
|
|
|
GOAL_COLOR=b_magenta
|
|
|
|
HELP_SEP= >>
|
|
|
|
-include .task.mk
|
|
|
|
ifeq "help" "$(filter help,$(MAKECMDGOALS))"
|
|
|
|
.task.mk:
|
|
|
|
curl https://raw.githubusercontent.com/daylinmorgan/task.mk/main/task.mk -o .task.mk
|
|
|
|
endif
|