forked from getmail6/getmail6
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
73 lines (60 loc) · 1.99 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# docs/COPYING 2a + DRY: https://github.com/getmail6/getmail6
# Please refer to the git history regarding who changed what and when in this file.
# Needs Docker Daemon running
# systemctl start docker
.PHONY: doc
doc:
links -dump docs/documentation.html > docs/documentation.txt
links -dump docs/configuration.html > docs/configuration.txt
links -dump docs/faq.html > docs/faq.txt
links -dump docs/troubleshooting.html > docs/troubleshooting.txt
.PHONY: testclean
testclean:
[ -d /tmp/mailserver/ ] && (cd /tmp/mailserver && docker-compose down) || true
[ -d /tmp/mailserver/ ] && sudo rm -rf /tmp/mailserver || true
.PHONY: test3
test3:
cd test && ./prepare_test.sh
cd /tmp/mailserver && test/bats/bin/bats test/test_getmail_with_docker_mailserver.bats
.PHONY: testpython
testpython:
pytest test/test.py
.PHONY: test
test: testpython testclean test3
cd /tmp/mailserver && docker-compose down
.PHONY: lint
lint:
ruff check .
.PHONY: check
check: lint
/usr/bin/man -l docs/getmail.1
/usr/bin/man -l docs/getmails.1
/usr/bin/man -l docs/getmail_fetch.1
/usr/bin/man -l docs/getmail_maildir.1
/usr/bin/man -l docs/getmail_mbox.1
restview --long-description --strict
.PHONY: dist
dist: doc
echo "need sudo to create wheel"
sudo python setup.py bdist_wheel sdist
echo "note:"
echo "use ./pypi.sh to upload to PYPI"
# use ./pypi.sh to upload to PYPI
.PHONY: up6
up6: dist
twine upload dist/`ls dist -rt *.whl | tail -1` dist/`ls dist -rt *.tar.gz | tail -1` -u__token__ -p`pass show pypi.org/getmail6_api_token`
.PHONY: up
up: dist
twine upload dist/`ls dist -rt *.whl | tail -1` dist/`ls dist -rt *.tar.gz | tail -1` -u__token__ -p`pass show pypi.org/getmail_api_token`
.PHONY: tag
tag: dist
$(eval TAGMSG="v$(shell ./getmail --version | cut -d ' ' -f 2)")
echo $(TAGMSG)
git tag -s $(TAGMSG) -m"$(TAGMSG)"
git verify-tag $(TAGMSG)
git push origin $(TAGMSG) --follow-tags
.PHONY: cleandocker
cleandocker:
docker network prune
docker rm -vf $$(docker ps -aq)
docker rmi -f $$(docker images -aq)