-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (50 loc) · 1.22 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
.PHONY: commit dist release setup update
export PIPENV_VENV_IN_PROJECT=1
MESSAGE =
VERSION = $(shell grep "version" setup.py | sed "s/.*version='\(.*\)*'.*/\1/")
TAG = v$(VERSION)
commit: git-commit
dist: dist-upload
release: git-tag
setup: setup-pipenv
update: git-pull update-pipenv
setup-pipenv: clean-pipenv
pipenv install --dev
clean:
find . -iname __pycache__ | xargs rm -rf
find . -iname '*.pyc' | xargs rm -f
clean-pipenv:
pipenv --rm
clean-pypi:
mkdir -p sdist eggs wheels
find . -iname '*.egg' | xargs mv -t eggs
find . -iname '*.whl' | xargs mv -t wheels
find . -iname '*.tar.gz' | xargs mv -t sdist
rm -rf build dist *.egg-info
dist-clean: clean clean-pypi
pypi-dist: clean-pypi
python setup.py sdist bdist_wheel
update-pipenv:
pipenv update
pipenv install --dev
pipenv clean
dist-upload: pypi-dist
twine check dist/*
twine upload dist/* -r pypi --skip-existing
twine upload dist/* -r pypitest --skip-existing
git-tag:
git tag --sign $(TAG)
git push --tag
git-pull:
git pull
git-commit:
git add .
git commit --gpg-sign
git push
github-release:
go run github.com/aktau/github-release release \
--user gousaiyang \
--repo tbtrim \
--tag $(TAG) \
--name $(TAG) \
--description $(MESSAGE)