From f22072a1677c25a4cf48888756809bb1453c40b5 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 2 Jun 2022 07:38:06 -0400 Subject: build: move sample html steps into Makefile --- Makefile | 23 +++++++++++++++++++++++ howto.txt | 15 ++------------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 79a1348a..b5fb1063 100644 --- a/Makefile +++ b/Makefile @@ -106,6 +106,29 @@ workflows: ## Run cog on the workflows to keep them up-to-date. prebuild: css workflows cogdoc ## One command for all source prep. +##@ Sample HTML reports + +.PHONY: _sample_cog_html sample_html sample_html_beta + +_sample_cog_html: clean + python -m pip install -e . + cd ~/cog/trunk; \ + rm -rf htmlcov; \ + PYTEST_ADDOPTS= coverage run --branch --source=cogapp -m pytest -k CogTestsInMemory; \ + coverage combine; \ + coverage html + +sample_html: _sample_cog_html ## Generate sample HTML report. + rm -f doc/sample_html/*.* + cp -r ~/cog/trunk/htmlcov/ doc/sample_html/ + rm doc/sample_html/.gitignore + +sample_html_beta: _sample_cog_html ## Generate sample HTML report for a beta release. + rm -f doc/sample_html_beta/*.* + cp -r ~/cog/trunk/htmlcov/ doc/sample_html_beta/ + rm doc/sample_html_beta/.gitignore + + ##@ Kitting: making releases .PHONY: kit kit_upload test_upload kit_local download_kits check_kits tag diff --git a/howto.txt b/howto.txt index da8dfc0c..94eb6c05 100644 --- a/howto.txt +++ b/howto.txt @@ -27,21 +27,10 @@ $ tox -e doc - commit the release-prep changes - Generate new sample_html to get the latest, incl footer version number: - $ make clean - $ pip install -e . - $ cd ~/cog/trunk - $ rm -rf htmlcov - $ PYTEST_ADDOPTS= coverage run --branch --source=cogapp -m pytest -k CogTestsInMemory; coverage combine; coverage html - IF PRE-RELEASE: - $ rm -f ~/coverage/trunk/doc/sample_html_beta/*.* - $ cp -r htmlcov/ ~/coverage/trunk/doc/sample_html_beta/ - $ rm ~/coverage/trunk/doc/sample_html_beta/.gitignore - - IF NOT PRE-RELEASE: - $ rm -f ~/coverage/trunk/doc/sample_html/*.* - $ cp -r htmlcov/ ~/coverage/trunk/doc/sample_html/ - $ rm ~/coverage/trunk/doc/sample_html/.gitignore - $ cd ~/coverage/trunk + $ make sample_html_beta - IF NOT PRE-RELEASE: + $ make sample_html check in the new sample html - Done with changes to source files, check them in. $ git push -- cgit v1.2.1