-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
47 lines (36 loc) · 1 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
BEANGREP_BIN = bin/bean-grep
BEANGREP_PY = src/beangrep/beangrep.py
CLI_PY = src/beangrep/cli.py
DIST_DIR = dist
MAN_EXTRAS = doc/man-extras.h2m
MAN_PAGE = src/beangrep/data/bean-grep.1
README = README.md
PYTHON = python3
TWINE = $(PYTHON) -m twine
UPDATE_README = dev/update-readme
all: $(README) $(MAN_PAGE)
$(README): $(BEANGREP_PY) $(CLI_PY) $(UPDATE_README) Makefile
$(UPDATE_README)
$(MAN_PAGE): $(BEANGREP_PY) $(CLI_PY) $(MAN_EXTRAS) Makefile
help2man $(BEANGREP_BIN) --name "grep-like filter for Beancount" --no-info --include $(MAN_EXTRAS) --output $@
check:
pre-commit run -a
coverage:
dev/coverage
test:
pytest
build release: all
$(PYTHON) -m build
upload:
$(MAKE) distclean
$(MAKE) release
$(TWINE) upload --repository pypi $(DIST_DIR)/*
test-upload: release
$(MAKE) distclean
$(MAKE) release
$(TWINE) upload --repository testpypi $(DIST_DIR)/*
clean:
rm -f $(MAN_PAGE)
distclean: clean
rm -rf $(DIST_DIR)/
.PHONY: all build check clean coverage distclean release test test-upload upload