Skip to content

Commit

Permalink
Added targets to automate the release process.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhololkeolke committed May 25, 2015
1 parent 3846a76 commit 7c152b5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lspi-python-docs.zip

# Livereload
Gemfile
Gemfile.lock
Expand Down
28 changes: 22 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
.PHONY: html-docs clean clean-pyc test all flake8 sphinx-apidoc travis-test
.PHONY: html-docs clean clean-pyc clean-tests clean-releases test all flake8 sphinx-apidoc travis-test release upload-release

all: lspienv flake8 test html-docs

lspienv: lspienv/bin/activate

lspienv/bin/activate: requirements.txt
test -d lspienv || virtualenv lspienv
. lspienv/bin/activate; pip install -Ur requirements.txt
touch lspienv/bin/activate

flake8:
. lspienv/bin/activate; flake8 lspi

Expand All @@ -18,18 +18,34 @@ sphinx-apidoc:
html-docs: sphinx-apidoc
. lspienv/bin/activate; PYTHONPATH=.. $(MAKE) -C docs html

clean: clean-pyc clean-docs
clean: clean-pyc clean-docs clean-tests clean-releases


clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +

clean-docs:
$(MAKE) -C docs clean

clean-releases:
rm -rf dist/
rm -rf lspi_python.egg-info/
rm -rf build/
rm -f lspi-python-docs.zip

clean-tests:
rm -rf htmlcov/

test:
. lspienv/bin/activate; nosetests --config=setup.cfg lspi_testsuite

travis-test:
nosetests --config=setup.cfg lspi_testsuite

release: lspienv flake8 test html-docs
. lspienv/bin/activate; python setup.py sdist bdist_wheel
zip -r lspi-python-docs.zip docs/build/html/*

upload-release: release
. lspienv/bin/activate; twine upload -p $@ dist/*

0 comments on commit 7c152b5

Please sign in to comment.