dotfiles/Makefile

41 lines
959 B
Makefile
Raw Normal View History

2022-09-02 16:05:16 -05:00
## lint | lint.*
2022-09-06 09:03:24 -05:00
.PHONY: lint
2022-08-01 16:34:13 -05:00
lint: lint.py lint.sh
2022-09-08 12:53:55 -05:00
msg = $(call tprint,{a.b_magenta}==>{a.end}{a.bold} $(1){a.end})
2022-09-07 09:16:31 -05:00
## lint.py | lint python files
.PHONY: lint.py
2022-09-08 12:53:55 -05:00
lint.py: info
$(call msg,Linting Python Files)
@black $(shell find -type f -name "*.py")
2022-09-02 16:05:16 -05:00
## lint.sh | lint shell files
2022-09-06 09:03:24 -05:00
.PHONY: lint.sh
2022-08-01 16:34:13 -05:00
lint.sh:
2022-09-08 12:53:55 -05:00
$(call msg,Linting Shell Files)
@shfmt -s -w $(shell shfmt -f .)
2022-09-02 16:05:16 -05:00
## db, d-build | build docker image
2022-09-06 09:03:24 -05:00
.PHONY: db d-build
2022-09-02 16:05:16 -05:00
db d-build:
2022-09-08 12:53:55 -05:00
$(call msg,Building Docker Image)
@docker build -f docker/Dockerfile -t dots .
2022-09-02 16:05:16 -05:00
## dr, d-run | run docker image
2022-09-06 09:03:24 -05:00
.PHONY: dr d-run
2022-09-02 16:05:16 -05:00
dr d-run:
2022-09-08 12:53:55 -05:00
$(call msg,Running Docker Image)
2022-09-02 16:05:16 -05:00
docker run --rm -it dots
.PHONY: dr-keep
dr-keep:
docker run -it dots
2022-09-05 23:49:15 -05:00
.DEFAULT_GOAL = help
GOAL_COLOR = b_magenta
HELP_SEP = ->>
2022-09-08 12:53:55 -05:00
USAGE = {a.italic}{a.b_cyan}Best Dots Around{a.end}\n
2022-09-02 16:05:16 -05:00
-include .task.mk
2022-09-07 00:17:50 -05:00
$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/main/task.mk -o .task.mk)