-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
executable file
·44 lines (34 loc) · 1.4 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
NOSEOPTIONS = -x -v --exe --nologcapture
VENV_HOME?=.
mkplugin:
curl -k https://raw.githubusercontent.com/stardust85/make-plugins/master/make-rpm.mk > make-rpm.mk
-include make-rpm.mk
testrelease:
sed -i "s/'.*'/'$(VERSION)'/" repositorytools/__init__.py
git commit -a -m 'bumped version'
git push
git tag $(VERSION)
git push --tags
python setup.py sdist
python setup.py bdist_wheel --universal
twine upload -r pypitest
release:
twine upload -r pypi
unittests:
. $(VENV_HOME)/testenv/bin/activate && nosetests $(NOSEOPTIONS) tests/unit && deactivate
systemtests:
. $(VENV_HOME)/testenv/bin/activate && nosetests $(NOSEOPTIONS) tests/system && deactivate
singletest:
. $(VENV_HOME)/testenv/bin/activate && nosetests $(NOSEOPTIONS) $(test) && deactivate
# example: make singletest test=tests/system/repository_test.py:RepositoryTest.test_set_artifact_metadata
tests: testenv
. $(VENV_HOME)/testenv/bin/activate && nosetests $(NOSEOPTIONS) tests/unit tests/system --with-coverage --cover-package=repositorytools && deactivate
testenv:
virtualenv --system-site-packages $(VENV_HOME)/testenv
$(VENV_HOME)/testenv/bin/pip install -U pip
$(VENV_HOME)/testenv/bin/pip install --ignore-installed -e .
$(VENV_HOME)/testenv/bin/pip install -r requirements.txt
docs:
. venv/bin/activate && sphinx-apidoc -f -o docs repositorytools && deactivate
. venv/bin/activate && make -C docs html && deactivate
.PHONY: tests docs