-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
45 lines (38 loc) · 1.24 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
SHELL := /bin/bash
all: clean setup test
clean:
@echo "Removing junk..."
rm -f *.txt~
init:
@echo "Building devmode..."
python setup.py develop
@echo "Building devmode..."
pip install -r requirements.txt
setup:
@echo "Installing package locally..."
python setup.py install
publish: clean tag
@if [ -e "$$HOME/.pypirc" ]; then \
echo "Uploading to pypi"; \
git stash
python setup.py sdist upload \
git stash apply
else \
echo "You should create a file called '.pypirc' under your home dir.\n"; \
exit 1; \
fi
tag:
@if [ $$(git rev-list $$(git describe --abbrev=0 --tags)..HEAD --count) -gt 0 ]; then \
if [ $$(git log -n 1 --oneline $$(git describe --abbrev=0 --tags)..HEAD CHANGELOG.md | wc -l) -gt 0 ]; then \
git tag $$(python setup.py --version) && git push --tags || echo 'Version already released, update your version!'; \
else \
echo "CHANGELOG not updated since last release!"; \
exit 1; \
fi; \
else \
echo "No commits since last release!"; \
exit 1;\
fi
test:
@echo "Running test..."
python setup.py test