mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-12-22 10:40:44 -06:00
build: upgrade task.mk
This commit is contained in:
parent
34a024596d
commit
24d77a198c
2 changed files with 13 additions and 21 deletions
3
.task.cfg.mk
Normal file
3
.task.cfg.mk
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
USAGE={a.bold}{a.cyan} viv isn't venv{a.end}\n\n\ttasks:\n
|
||||||
|
PHONIFY=1
|
||||||
|
HELP_SEP={a.b_blue}>>>{a.end}
|
31
Makefile
31
Makefile
|
@ -1,46 +1,35 @@
|
||||||
VERSION ?= $(shell git describe --tags --always --dirty=-dev | sed 's/^v//g')
|
VERSION ?= $(shell git describe --tags --always --dirty=-dev | sed 's/^v//g')
|
||||||
PREFIX ?= ~/bin
|
PREFIX ?= ~/bin
|
||||||
## lint | run pre-commit hooks
|
lint: ## run pre-commit hooks
|
||||||
lint:
|
|
||||||
pdm run pre-commit run --all || pdm run pre-commit run --all
|
pdm run pre-commit run --all || pdm run pre-commit run --all
|
||||||
## types | run mypy
|
types: ## run mypy
|
||||||
types:
|
|
||||||
mypy src/viv
|
mypy src/viv
|
||||||
|
|
||||||
## bump-version | update version and tag commit
|
bump-version: ## update version and tag commit
|
||||||
bump-version:
|
|
||||||
@echo "bumping to version => $(VERSION)"
|
@echo "bumping to version => $(VERSION)"
|
||||||
@sed -i 's/__version__ = ".*"/__version__ = "$(VERSION)"/g' src/viv/viv.py
|
@sed -i 's/__version__ = ".*"/__version__ = "$(VERSION)"/g' src/viv/viv.py
|
||||||
@git add src/viv/viv.py && git commit -m "chore: bump version"
|
@git add src/viv/viv.py && git commit -m "chore: bump version"
|
||||||
@git tag v$(VERSION)
|
@git tag v$(VERSION)
|
||||||
|
|
||||||
## env | generate environment
|
env: ## generate environment
|
||||||
env:
|
|
||||||
pdm install
|
pdm install
|
||||||
|
|
||||||
## install | symlink to $PREFIX
|
install: ## symlink to $PREFIX
|
||||||
install:
|
|
||||||
ln -sf $(shell pwd)/src/viv/viv.py $(PREFIX)/viv
|
ln -sf $(shell pwd)/src/viv/viv.py $(PREFIX)/viv
|
||||||
|
|
||||||
## uninstall | delete $(PREFIX)/viv
|
uninstall: ## delete $(PREFIX)/viv
|
||||||
uninstall:
|
|
||||||
rm $(PREFIX)/viv
|
rm $(PREFIX)/viv
|
||||||
|
|
||||||
## docs | generate usage examples
|
docs: docs/demo.gif docs/freeze.gif ## generate usage examples
|
||||||
docs: docs/demo.gif docs/freeze.gif
|
|
||||||
|
|
||||||
docs/%.gif: docs/%.tape
|
docs/%.gif: docs/%.tape
|
||||||
viv rm $$(viv l -q)
|
viv rm $$(viv l -q)
|
||||||
vhs < $<
|
vhs < $<
|
||||||
|
|
||||||
EXAMPLES = cli.py sys_path.py exe_specific.py frozen_import.py named_env.py scrape.py
|
EXAMPLES = cli.py sys_path.py exe_specific.py frozen_import.py named_env.py scrape.py
|
||||||
generate-example-vivens:
|
generate-example-vivens: ##
|
||||||
for f in $(EXAMPLES); \
|
for f in $(EXAMPLES); \
|
||||||
do python examples/$$f; done
|
do python examples/$$f; done
|
||||||
|
|
||||||
.PHONY: env lint install uninstall \
|
-include .task.cfg.mk .task.mk
|
||||||
bump-version types docs generate-example-vivens
|
$(if $(filter help,$(MAKECMDGOALS)),$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v23.1.1/task.mk -o .task.mk))
|
||||||
|
|
||||||
USAGE={a.bold}==>{a.cyan} viv isn't venv{a.end}\n\ttasks:
|
|
||||||
-include .task.mk
|
|
||||||
$(if $(filter help,$(MAKECMDGOALS)),$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v22.9.28/task.mk -o .task.mk))
|
|
||||||
|
|
Loading…
Reference in a new issue