-
Notifications
You must be signed in to change notification settings - Fork 1
/
rules.mk
59 lines (46 loc) · 1.19 KB
/
rules.mk
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
46
47
48
49
50
51
52
53
54
55
56
57
58
LIB=$(NAME)-mind-machine
SHORT=$(NAME)mindmachine
[email protected]:rainbow-mind-machine/$(LIB).git
BMM_CMR=ssh://[email protected]:222/bots/$(LIB).git
MKM_CMR=ssh://[email protected]:222/charlesreid1/mkdocs-material.git
SHELL := /bin/bash
default:
# clone the site/ directory to be the gh-pages branch
clone_site:
rm -rf site
git clone -b gh-pages $(BMM_CMR) site && \
cd site && \
git remote rename origin cmr && \
git remote add gh $(BMM_GH)
# build and deploy docs to gh-pages branch
deploy_docs:
mkdocs build
cd site \
&& git add -A . \
&& git commit -a -m 'updating gh-pages site' \
&& git push gh gh-pages \
&& git push cmr gh-pages
clean_docs:
rm -rf site/
# build the documentation
build_docs:
mkdocs build
# build and locally serve the documentation
serve_docs:
mkdocs build
mkdocs serve
# run tests
test:
python setup.py test
# upload to pypi
pypi: pypi_upload pypi_test
pypi_upload:
@echo "The following commands require that you have"
@echo "your pypi credentials stored in ~/.pypirc"
python setup.py sdist
python setup.py sdist upload
pypi_test:
virtualenv testmm
source testmm/bin/activate
testmm/bin/pip install $(SHORT)
rm -rf testmm