-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (40 loc) · 1.08 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
48
49
50
51
52
53
54
# Set output dir
BUILDDIR=dist
PROJECT_BASE=noti_py
#GH/github command used to initiate a release
GH=/usr/bin/gh
TEA=~/bin/tea
test:
pytest -v
test:
pytest -v
build: dir
poetry build
dir:
[ -d $(BUILDDIR) ] || mkdir -p $(BUILDDIR)
clean:
rm -rf $(BUILDDIR)
find . -name __pycache__|xargs rm -rf
poetry-release: build
poetry publish
coverage:
coverage run -m pytest
coverage report -m
pyflakes:
pyflakes ${PROJECT_BASE}
pylint:
pylint ${PROJECT_BASE}
gh-release: build
#Figure out what the last/most recent build is
$(eval LATEST = $(shell ls -t1 ${BUILDDIR}/*|head -n1))
$(eval TAG = $(shell git describe --tag --abbrev=0))
@echo "Sending $(TAG) to github"
${GH} release create $(TAG) $(LATEST)
tea-release: build
#Figure out what the last/most recent build is
$(eval LATEST = $(shell ls -t1 ${BUILDDIR}/*|head -n1))
$(eval TAG = $(shell git describe --tag --abbrev=0))
@echo "Sending $(TAG) to git"
${TEA} release create --tag $(TAG) --title "release for $(TAG) -a $(LATEST)
release: poetry-release
.PHONY: dir clean release gh-release poetry-release coverage tea-release