-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
56 lines (38 loc) · 1.18 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
all:
echo "Please check the Makefile for available targets"
VERSION := $(shell python3 -c "import setup; print(setup.metadata.version)")
TAG := 'egenix-telegram-antispam-bot-$(VERSION)'
### Prepare the virtual env
install-pyrun:
install-pyrun --python=3.10 pyenv
install-venv:
python3 -m venv pyenv
packages:
pip install -r requirements.txt
dev-packages: packages
pip install -r requirements-dev.txt
update-packages:
pip install -U -r requirements-base.txt
freeze-packages:
pip freeze > requirements.txt
### Build
clean:
find . \( -name '*~' -or -name '*.bak' \) -exec rm {} ';'
distclean: clean
rm -rf build dist *.egg-info __pycache__
create-dist: clean
echo "Building distributions for version $(VERSION)"
python3 setup.py sdist bdist_wheel
tag-release:
git tag -a $(TAG) -m "Release $(VERSION)"
git push origin --tags
test-upload:
python3 -m twine upload -r testpypi dist/*$(VERSION).tar.gz
python3 -m twine upload -r testpypi dist/*$(VERSION)-py*.whl
prod-upload:
python3 -m twine upload dist/*$(VERSION).tar.gz
python3 -m twine upload dist/*$(VERSION)-py*.whl
cp dist/*$(VERSION).tar.gz ~/projects/archives
### Run the bot
run:
python3 -m telegram_antispam_bot