-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
36 lines (21 loc) · 576 Bytes
/
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
VERSION := $(shell poetry version --short)
help:
@echo "Usage: 'make clean' or 'make build' or 'make tag' or 'make upload' or 'make test'"
clean:
rm -rf dist/*
build: clean
poetry build
tag:
git tag -l | grep -q v$(VERSION) || { \
git tag v$(VERSION) && \
git push && \
git push --tags; \
}
upload: tag build
poetry publish
GeoIP2-City-Test.mmdb:
rm -f GeoIP2-City-Test.mmdb
wget https://github.com/maxmind/MaxMind-DB/raw/main/test-data/GeoIP2-City-Test.mmdb
test: GeoIP2-City-Test.mmdb
poetry run pytest
.PHONY: help clean build tag upload test