-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (27 loc) · 740 Bytes
/
Makefile
File metadata and controls
39 lines (27 loc) · 740 Bytes
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
# vim: ts=4 sw=4 noet
PYPI_REPO ?= testpypi
VERSION ?= $(shell echo "0.5.dev$$(date -u +'%j%H%M' | sed -e 's/^0//')")
SEDI = sed -i -E -e
VERSIONQ = '$(VERSION)'
.PHONY: clean dist push pypi-upload release setver
define usage
clean
dist
pypi-upload PYPI_REPO=...
release VERSION=...
setver VERSION=...
endef
help:
@$(info $(usage))
@exit 0
clean:
rm -fr dist/*
dist:
python -m build
pypi-upload:
twine upload --sign --identity 6AE2A84723D56D985B340BC08E5FA4709F69E911 --repository $(PYPI_REPO) dist/*
release: setver
$(SEDI) "s/(RELEASE=).*/\1$(VERSIONQ)/" scripts/install
setver:
$(SEDI) "s/(^VERSION =).*/\1 $(VERSIONQ)/" postqf/__init__.py
$(SEDI) "s/(^version =).*/\1 $(VERSION)/" setup.cfg