mirror of
https://github.com/daylinmorgan/logo.git
synced 2024-12-21 22:10:45 -06:00
chore: initialize .task.mk
This commit is contained in:
parent
05bbe6cd26
commit
c56e2da260
3 changed files with 10 additions and 18 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -170,3 +170,4 @@ cython_debug/
|
|||
docs/*
|
||||
!docs/index.html
|
||||
|
||||
.task.mk
|
||||
|
|
3
.task.cfg.mk
Normal file
3
.task.cfg.mk
Normal file
|
@ -0,0 +1,3 @@
|
|||
USAGE={a.b_magenta}daylin's logo{a.end}\n
|
||||
-include .task.mk
|
||||
$(if $(filter help,$(MAKECMDGOALS)),$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v23.1.2/task.mk -o .task.mk))
|
24
Makefile
24
Makefile
|
@ -16,8 +16,7 @@ all:
|
|||
@$(MAKE) pngs
|
||||
|
||||
.PHONY: pngs
|
||||
## generate all of the logo pngs
|
||||
pngs: $(PNGS)
|
||||
pngs: $(PNGS) ## generate all of the logo pngs
|
||||
|
||||
docs/png/index.html: docs/index.html
|
||||
@cat docs/index.html |\
|
||||
|
@ -30,20 +29,17 @@ docs/png/%.png: docs/svg/%.svg
|
|||
@inkscape --export-filename=$@ $<
|
||||
|
||||
.PHONY: logos
|
||||
## generate all of the logo svgs
|
||||
svgs: $(SRC)
|
||||
svgs: $(SRC) ## generate all of the logo svgs
|
||||
./generate-all.py $(REV)
|
||||
|
||||
.PHONY: lint
|
||||
## apply isort/black/flake8
|
||||
lint:
|
||||
lint: ## apply isort/black/flake8
|
||||
@isort logo
|
||||
@black logo
|
||||
@flake8 logo
|
||||
|
||||
.PHONY: bootstrap pdm-env conda-env
|
||||
## bootstrap the conda environment
|
||||
bootstrap: pdm-env
|
||||
bootstrap: pdm-env ## bootstrap the conda environment
|
||||
|
||||
conda-env:
|
||||
$(CONDA) CONDA_ALWAYS_YES="true" mamba create -p ./env python --force
|
||||
|
@ -54,18 +50,10 @@ pdm-env: conda-env
|
|||
pdm install
|
||||
|
||||
.PHONY: clean
|
||||
## remove old files
|
||||
clean:
|
||||
clean: ## remove old files
|
||||
rm -f *.svg *.png
|
||||
rm -f docs/*.svg
|
||||
rm -f docs/svg/*
|
||||
rm -f docs/png/*
|
||||
|
||||
|
||||
.PHONY: help
|
||||
help: ## try `make help`
|
||||
@awk '/^[a-z.A-Z_-]+:/ { helpMessage = match(lastLine, /^##(.*)/); \
|
||||
if (helpMessage) { helpCommand = substr($$1, 0, index($$1, ":")-1); \
|
||||
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
|
||||
printf "\033[36m%-9s\033[0m - %s\n", \
|
||||
helpCommand, helpMessage;}} { lastLine = $$0 }' $(MAKEFILE_LIST)
|
||||
-include .task.cfg.mk
|
||||
|
|
Loading…
Reference in a new issue