2023-01-21 14:27:20 -06:00
|
|
|
lint: lint.py lint.sh ## lint.*
|
2022-08-01 16:34:13 -05:00
|
|
|
|
2022-10-06 10:53:31 -05:00
|
|
|
msg = $(if tprint,$(call tprint,{a.b_magenta}==>{a.end}{a.bold} $(1){a.end}),@echo '==> $(1)')
|
2022-09-08 12:53:55 -05:00
|
|
|
|
2023-01-21 14:27:20 -06:00
|
|
|
lint.py: info ## lint python files
|
2022-09-08 12:53:55 -05:00
|
|
|
$(call msg,Linting Python Files)
|
|
|
|
@black $(shell find -type f -name "*.py")
|
2022-09-02 16:05:16 -05:00
|
|
|
|
2022-09-06 09:03:24 -05:00
|
|
|
.PHONY: lint.sh
|
2023-01-21 14:27:20 -06:00
|
|
|
lint.sh: ## lint shell files
|
2022-09-08 12:53:55 -05:00
|
|
|
$(call msg,Linting Shell Files)
|
|
|
|
@shfmt -s -w $(shell shfmt -f .)
|
2022-07-29 09:44:46 -05:00
|
|
|
|
2023-01-21 14:27:20 -06:00
|
|
|
completions: ## generate completion scripts
|
2022-10-06 10:53:31 -05:00
|
|
|
$(call msg,Generating Completions)
|
|
|
|
@./lib/completions/update.sh
|
|
|
|
|
2022-12-09 17:12:04 -06:00
|
|
|
.PHONY: fzf
|
2023-01-21 14:27:20 -06:00
|
|
|
fzf: lib/.fzf/completion.zsh lib/.fzf/key-bindings.zsh ## update fzf shell scripts
|
2022-12-09 17:12:04 -06:00
|
|
|
|
2023-01-21 14:27:20 -06:00
|
|
|
# update fzf shell scripts
|
2022-12-09 17:12:04 -06:00
|
|
|
lib/.fzf/%.zsh: FORCE
|
|
|
|
wget -O $@ \
|
|
|
|
https://raw.githubusercontent.com/junegunn/fzf/master/shell/$*.zsh
|
|
|
|
|
2022-09-06 09:03:24 -05:00
|
|
|
.PHONY: db d-build
|
2023-01-21 14:27:20 -06:00
|
|
|
db d-build: ## build docker image
|
2022-09-08 12:53:55 -05:00
|
|
|
$(call msg,Building Docker Image)
|
2022-12-09 14:25:06 -06:00
|
|
|
@DOCKER_BUILDKIT=1 docker build \
|
|
|
|
--secret id=GITHUB_TOKEN \
|
2022-12-09 17:12:04 -06:00
|
|
|
--progress=plain \
|
2022-12-09 14:25:06 -06:00
|
|
|
-f docker/Dockerfile \
|
|
|
|
-t dots .
|
2022-09-02 16:05:16 -05:00
|
|
|
|
2022-09-06 09:03:24 -05:00
|
|
|
.PHONY: dr d-run
|
2023-01-21 14:27:20 -06:00
|
|
|
dr d-run: ## run docker image
|
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-12-09 17:12:04 -06:00
|
|
|
FORCE:
|
|
|
|
|
2022-09-05 23:49:15 -05:00
|
|
|
.DEFAULT_GOAL = help
|
2023-01-21 14:27:20 -06:00
|
|
|
-include .task.cfg.mk .task.mk
|
2022-09-14 16:21:25 -05:00
|
|
|
$(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")
|