Skip to content

Commit

Permalink
Update build steps in makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
defnull committed Dec 1, 2019
1 parent 774e1c7 commit 6927a6b
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
PATH := build/python/bin:$(PATH)
VERSION = $(shell python setup.py --version)
ALLFILES = $(shell echo bottle.py test/*.py test/views/*.tpl)
VENV = build/venv

.PHONY: release coverage install docs test test_all test_25 test_26 test_27 test_31 test_32 test_33 2to3 clean

release: test_all
python setup.py --version | egrep -q -v '[a-zA-Z]' # Fail on dev/rc versions
git commit -e -m "Release of $(VERSION)" # Fail on nothing to commit
git tag -a -m "Release of $(VERSION)" $(VERSION) # Fail on existing tags
git push origin HEAD # Fail on out-of-sync upstream
git push origin tag $(VERSION) # Fail on dublicate tag
python setup.py sdist register upload # Release to pypi
release: venv
$(VENV)/bin/python3 setup.py --version | egrep -q -v '[a-zA-Z]' # Fail on dev/rc versions
git commit -e -m "Release of $(VERSION)" # Fail on nothing to commit
git tag -a -m "Release of $(VERSION)" $(VERSION) # Fail on existing tags
git push origin HEAD # Fail on out-of-sync upstream
git push origin tag $(VERSION) # Fail on dublicate tag
$(VENV)/bin/python3 setup.py sdist bdist_wheel # Build project
$(VENV)/bin/twine upload # Release to pypi

venv: $(VENV)/.installed
$(VENV)/.installed: Makefile
python3 -mvenv $(VENV)
$(VENV)/bin/python3 -mensurepip
$(VENV)/bin/pip install -U pip
$(VENV)/bin/pip install -U setuptools wheel twine coverage
touch $(VENV)/.installed

coverage:
-mkdir build/
Expand Down Expand Up @@ -63,4 +73,3 @@ clean:
find . -name '*~' -exec rm -f {} +
find . -name '._*' -exec rm -f {} +
find . -name '.coverage*' -exec rm -f {} +

0 comments on commit 6927a6b

Please sign in to comment.