2022-12-19 23:15:56 -06:00
|
|
|
VERSION ?= $(shell git describe --tags --always --dirty=-dev | sed 's/^v//g')
|
2022-12-20 10:21:42 -06:00
|
|
|
PREFIX ?= ~/bin
|
2022-12-19 23:11:12 -06:00
|
|
|
|
|
|
|
lint:
|
2022-12-20 12:40:54 -06:00
|
|
|
pdm run pre-commit run --all || pdm run pre-commit run --all
|
2022-12-19 23:11:12 -06:00
|
|
|
|
|
|
|
types:
|
|
|
|
mypy src/
|
|
|
|
|
|
|
|
bump-version:
|
|
|
|
@echo "bumping to version => $(VERSION)"
|
2022-12-20 14:38:17 -06:00
|
|
|
@sed -i 's/__version__ = ".*"/__version__ = "$(VERSION)"/g' src/viv/viv.py
|
|
|
|
@git add src/viv/viv.py && git commit -m "chore: bump version"
|
|
|
|
@git tag v$(VERSION)
|
2022-12-19 23:11:12 -06:00
|
|
|
|
|
|
|
env:
|
2022-12-20 12:40:54 -06:00
|
|
|
pdm install
|
2022-12-19 23:11:12 -06:00
|
|
|
|
|
|
|
install:
|
2022-12-20 12:40:54 -06:00
|
|
|
ln -sf $(shell pwd)/src/viv/viv.py $(PREFIX)/viv
|
2022-12-19 23:11:12 -06:00
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm ~/bin/viv
|
|
|
|
|
2022-12-20 14:29:21 -06:00
|
|
|
docs: docs/demo.gif
|
|
|
|
|
|
|
|
docs/%.gif: docs/%.tape
|
|
|
|
vhs < $<
|
|
|
|
|
|
|
|
.PHONY: env lint install uninstall bump-version types docs
|