Skip to content

Commit f22072a

Browse files
committed
build: move sample html steps into Makefile
1 parent aef8725 commit f22072a

File tree

2 files changed

+25
-13
lines changed

2 files changed

+25
-13
lines changed

Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,29 @@ workflows: ## Run cog on the workflows to keep them up-to-date.
106106
prebuild: css workflows cogdoc ## One command for all source prep.
107107

108108

109+
##@ Sample HTML reports
110+
111+
.PHONY: _sample_cog_html sample_html sample_html_beta
112+
113+
_sample_cog_html: clean
114+
python -m pip install -e .
115+
cd ~/cog/trunk; \
116+
rm -rf htmlcov; \
117+
PYTEST_ADDOPTS= coverage run --branch --source=cogapp -m pytest -k CogTestsInMemory; \
118+
coverage combine; \
119+
coverage html
120+
121+
sample_html: _sample_cog_html ## Generate sample HTML report.
122+
rm -f doc/sample_html/*.*
123+
cp -r ~/cog/trunk/htmlcov/ doc/sample_html/
124+
rm doc/sample_html/.gitignore
125+
126+
sample_html_beta: _sample_cog_html ## Generate sample HTML report for a beta release.
127+
rm -f doc/sample_html_beta/*.*
128+
cp -r ~/cog/trunk/htmlcov/ doc/sample_html_beta/
129+
rm doc/sample_html_beta/.gitignore
130+
131+
109132
##@ Kitting: making releases
110133

111134
.PHONY: kit kit_upload test_upload kit_local download_kits check_kits tag

howto.txt

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,10 @@
2727
$ tox -e doc
2828
- commit the release-prep changes
2929
- Generate new sample_html to get the latest, incl footer version number:
30-
$ make clean
31-
$ pip install -e .
32-
$ cd ~/cog/trunk
33-
$ rm -rf htmlcov
34-
$ PYTEST_ADDOPTS= coverage run --branch --source=cogapp -m pytest -k CogTestsInMemory; coverage combine; coverage html
3530
- IF PRE-RELEASE:
36-
$ rm -f ~/coverage/trunk/doc/sample_html_beta/*.*
37-
$ cp -r htmlcov/ ~/coverage/trunk/doc/sample_html_beta/
38-
$ rm ~/coverage/trunk/doc/sample_html_beta/.gitignore
39-
- IF NOT PRE-RELEASE:
40-
$ rm -f ~/coverage/trunk/doc/sample_html/*.*
41-
$ cp -r htmlcov/ ~/coverage/trunk/doc/sample_html/
42-
$ rm ~/coverage/trunk/doc/sample_html/.gitignore
43-
$ cd ~/coverage/trunk
31+
$ make sample_html_beta
4432
- IF NOT PRE-RELEASE:
33+
$ make sample_html
4534
check in the new sample html
4635
- Done with changes to source files, check them in.
4736
$ git push

0 commit comments

Comments
 (0)