-
Notifications
You must be signed in to change notification settings - Fork 131
/
makefile
47 lines (34 loc) · 1.09 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
.PHONY: upload release release-test release-tag upload
VERSION_FILE?=setup.py
version:
python setup.py --version
version-%: OLDVERSION:=$(shell python setup.py --version)
version-%: NEWVERSION=$(subst -,.,$*)
version-%:
sed -i '' -e s/$(OLDVERSION)/$(NEWVERSION)/ $(VERSION_FILE)
git ci setup.py -m"bump version to $*"
lint:
flake8 --count --statistics redbeat tests
release: release-check release-tag upload
release-check:
git pull
make test
release-tag: VERSION:=$(shell python setup.py --version)
release-tag: TODAY:=$(shell date '+%Y-%m-%d')
release-tag:
sed -i -e "s/unreleased/$(TODAY)/" CHANGES.txt
git ci -m"update release date for $(VERSION) in CHANGES.txt" CHANGES.txt
git tag -a v$(VERSION) -m"release version $(VERSION)"
git push --tags
upload: VERSION:=$(shell python setup.py --version)
upload:
python setup.py sdist bdist_wheel
twine upload $(wildcard dist/celery-*$(VERSION)*) $(wildcard dist/celery_*$(VERSION)*)
docs:
$(MAKE) -C docs/ html
test: unittests
unittests:
python -m unittest discover tests
clean:
rm -f dist/*
rm -rf docs/_build docs/_static docs/_templates