chore: update task.mk

This commit is contained in:
Daylin Morgan 2023-01-21 14:27:20 -06:00
parent a8d43af719
commit 62582e0b2e
2 changed files with 13 additions and 20 deletions

4
.task.cfg.mk Normal file
View file

@ -0,0 +1,4 @@
GOAL_STYLE = b_magenta
HELP_SEP = {a.b_green}->>{a.end}
USAGE = {a.italic}{a.b_cyan}Best Dots Around{a.end}\n

View file

@ -1,37 +1,30 @@
## lint | lint.*
.PHONY: lint
lint: lint.py lint.sh
lint: lint.py lint.sh ## lint.*
msg = $(if tprint,$(call tprint,{a.b_magenta}==>{a.end}{a.bold} $(1){a.end}),@echo '==> $(1)')
## lint.py | lint python files
.PHONY: lint.py
lint.py: info
lint.py: info ## lint python files
$(call msg,Linting Python Files)
@black $(shell find -type f -name "*.py")
## lint.sh | lint shell files
.PHONY: lint.sh
lint.sh:
lint.sh: ## lint shell files
$(call msg,Linting Shell Files)
@shfmt -s -w $(shell shfmt -f .)
## completions | generate completion scripts
completions:
completions: ## generate completion scripts
$(call msg,Generating Completions)
@./lib/completions/update.sh
## fzf | update fzf shell scripts
.PHONY: fzf
fzf: lib/.fzf/completion.zsh lib/.fzf/key-bindings.zsh
fzf: lib/.fzf/completion.zsh lib/.fzf/key-bindings.zsh ## update fzf shell scripts
# update fzf shell scripts
lib/.fzf/%.zsh: FORCE
wget -O $@ \
https://raw.githubusercontent.com/junegunn/fzf/master/shell/$*.zsh
## db, d-build | build docker image
.PHONY: db d-build
db d-build:
db d-build: ## build docker image
$(call msg,Building Docker Image)
@DOCKER_BUILDKIT=1 docker build \
--secret id=GITHUB_TOKEN \
@ -39,9 +32,8 @@ db d-build:
-f docker/Dockerfile \
-t dots .
## dr, d-run | run docker image
.PHONY: dr d-run
dr d-run:
dr d-run: ## run docker image
$(call msg,Running Docker Image)
docker run --rm -it dots
@ -52,8 +44,5 @@ dr-keep:
FORCE:
.DEFAULT_GOAL = help
GOAL_STYLE = b_magenta
HELP_SEP = {a.b_green}->>{a.end}
USAGE = {a.italic}{a.b_cyan}Best Dots Around{a.end}\n
-include .task.mk
-include .task.cfg.mk .task.mk
$(if $(wildcard .task.mk),,.task.mk: ; @curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/main/task.mk -o .task.mk 2>/dev/null || echo "no curl, skipping task.mk download")