forked from dnsimple/dnsimple-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (36 loc) · 1.05 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
VERSION := $(shell python setup.py --version)
test: setup
test -f tests/.env || { echo "Set up your env file before running tests"; exit 1; }
tox
ci-setup:
pip install -r requirements.txt --upgrade
ci-test:
py.test tests
venv:
test -e env || python3 -m venv env
./env/bin/pip install -r requirements.txt --upgrade
./env/bin/python setup.py develop
setup: venv
pyenv install --skip-existing 2.7.14
pyenv install --skip-existing 3.6.4
pyenv local 3.6.4 2.7.14
pip install --upgrade tox tox-pyenv
deploy: setup
./env/bin/pip install --update versioneer
git diff-index --quiet HEAD -- || git stash
git checkout master
git pull origin master
git pull origin master --tags
gem install github_changelog_generator
github_changelog_generator --future-release=$(VERSION)
git add CHANGELOG.md
git commit -m "Deploy Version $(VERSION)"
git tag $(VERSION)
git push
git push --tags
rm dist/*
./env/bin/python setup.py sdist
gpg --detach-sign -a dist/dnsimple-$(VERSION).tar.gz
./env/bin/pip install twine --upgrade
./env/bin/twine upload dist/*
.PHONY: test