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
|
2023-03-02 23:01:44 -06:00
|
|
|
|
2023-01-22 14:40:13 -06:00
|
|
|
lint: ## run pre-commit hooks
|
2022-12-20 12:40:54 -06:00
|
|
|
pdm run pre-commit run --all || pdm run pre-commit run --all
|
2023-03-02 23:01:44 -06:00
|
|
|
|
2023-01-22 14:40:13 -06:00
|
|
|
types: ## run mypy
|
2022-12-20 15:02:25 -06:00
|
|
|
mypy src/viv
|
2022-12-19 23:11:12 -06:00
|
|
|
|
2023-01-22 14:40:13 -06:00
|
|
|
bump-version: ## update version and tag commit
|
2022-12-19 23:11:12 -06:00
|
|
|
@echo "bumping to version => $(VERSION)"
|
2022-12-20 14:38:17 -06:00
|
|
|
@sed -i 's/__version__ = ".*"/__version__ = "$(VERSION)"/g' src/viv/viv.py
|
2023-05-26 19:13:34 -05:00
|
|
|
@sed -i 's/install -r .*/install -r v$(VERSION)/g' README.md
|
|
|
|
@git add src/viv/viv.py README.md && git commit -m "chore: bump version" --no-verify
|
2022-12-20 14:38:17 -06:00
|
|
|
@git tag v$(VERSION)
|
2022-12-19 23:11:12 -06:00
|
|
|
|
2023-03-02 23:01:44 -06:00
|
|
|
venv: ## generate environment
|
2022-12-20 12:40:54 -06:00
|
|
|
pdm install
|
2022-12-19 23:11:12 -06:00
|
|
|
|
2023-05-26 19:13:34 -05:00
|
|
|
# TAPES = demo freeze list-info-remove
|
|
|
|
# GIFS := $(foreach n, $(TAPES), docs/$(n).gif)
|
2023-05-28 17:39:24 -05:00
|
|
|
# docs: $(GIFS) # generate usage examples
|
2022-12-19 23:11:12 -06:00
|
|
|
|
2023-05-26 19:13:34 -05:00
|
|
|
# docs/%.gif: docs/%.tape
|
|
|
|
# viv rm $$(viv l -q)
|
|
|
|
# cd docs; vhs < $*.tape
|
2022-12-20 14:29:21 -06:00
|
|
|
|
2023-03-07 13:00:48 -06:00
|
|
|
clean: ## remove build artifacts
|
|
|
|
rm -rf {build,dist}
|
|
|
|
|
2022-12-20 15:02:51 -06:00
|
|
|
EXAMPLES = cli.py sys_path.py exe_specific.py frozen_import.py named_env.py scrape.py
|
2023-01-22 14:40:13 -06:00
|
|
|
generate-example-vivens: ##
|
2022-12-20 15:02:51 -06:00
|
|
|
for f in $(EXAMPLES); \
|
|
|
|
do python examples/$$f; done
|
|
|
|
|
2023-02-13 13:50:51 -06:00
|
|
|
-include .task.cfg.mk
|