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/*
|
||||||
!docs/index.html
|
!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
|
@$(MAKE) pngs
|
||||||
|
|
||||||
.PHONY: pngs
|
.PHONY: pngs
|
||||||
## generate all of the logo pngs
|
pngs: $(PNGS) ## generate all of the logo pngs
|
||||||
pngs: $(PNGS)
|
|
||||||
|
|
||||||
docs/png/index.html: docs/index.html
|
docs/png/index.html: docs/index.html
|
||||||
@cat docs/index.html |\
|
@cat docs/index.html |\
|
||||||
|
@ -30,20 +29,17 @@ docs/png/%.png: docs/svg/%.svg
|
||||||
@inkscape --export-filename=$@ $<
|
@inkscape --export-filename=$@ $<
|
||||||
|
|
||||||
.PHONY: logos
|
.PHONY: logos
|
||||||
## generate all of the logo svgs
|
svgs: $(SRC) ## generate all of the logo svgs
|
||||||
svgs: $(SRC)
|
|
||||||
./generate-all.py $(REV)
|
./generate-all.py $(REV)
|
||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
## apply isort/black/flake8
|
lint: ## apply isort/black/flake8
|
||||||
lint:
|
|
||||||
@isort logo
|
@isort logo
|
||||||
@black logo
|
@black logo
|
||||||
@flake8 logo
|
@flake8 logo
|
||||||
|
|
||||||
.PHONY: bootstrap pdm-env conda-env
|
.PHONY: bootstrap pdm-env conda-env
|
||||||
## bootstrap the conda environment
|
bootstrap: pdm-env ## bootstrap the conda environment
|
||||||
bootstrap: pdm-env
|
|
||||||
|
|
||||||
conda-env:
|
conda-env:
|
||||||
$(CONDA) CONDA_ALWAYS_YES="true" mamba create -p ./env python --force
|
$(CONDA) CONDA_ALWAYS_YES="true" mamba create -p ./env python --force
|
||||||
|
@ -54,18 +50,10 @@ pdm-env: conda-env
|
||||||
pdm install
|
pdm install
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
## remove old files
|
clean: ## remove old files
|
||||||
clean:
|
|
||||||
rm -f *.svg *.png
|
rm -f *.svg *.png
|
||||||
rm -f docs/*.svg
|
rm -f docs/*.svg
|
||||||
rm -f docs/svg/*
|
rm -f docs/svg/*
|
||||||
rm -f docs/png/*
|
rm -f docs/png/*
|
||||||
|
|
||||||
|
-include .task.cfg.mk
|
||||||
.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)
|
|
||||||
|
|
Loading…
Reference in a new issue