viv/Makefile

27 lines
589 B
Makefile
Raw Normal View History

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
VENV_BIN = ./.venv/bin
lint:
pre-commit run --all || pre-commit run --all
types:
mypy src/
bump-version:
@echo "bumping to version => $(VERSION)"
@sed -i 's/__version__ = ".*"/__version__ = "$(VERSION)"/g' src/viv.py
env:
python -m venv ./.venv --upgrade-deps
$(VENV_BIN)/pip install pre-commit mypy
$(VENV_BIN)/pre-commit install --install-hooks
install:
2022-12-20 10:21:42 -06:00
ln -sf $(shell pwd)/src/viv.py $(PREFIX)/viv
2022-12-19 23:11:12 -06:00
uninstall:
rm ~/bin/viv
.PHONY: env lint install uninstall bump-version types