diff --git a/Makefile b/Makefile index 7d343f897b8..fc62269c916 100644 --- a/Makefile +++ b/Makefile @@ -290,11 +290,15 @@ list-translators: ## Collect the names of translators since the last merge from list-all-translators: ## Collect the names of all translators in the project's history. @$(DEVSHELL) $(SDROOT)/securedrop/i18n_tool.py list-translators --all -# TODO: test this to make sure the paths in update-user-guides work .PHONY: update-user-guides -update-user-guides: ## Run the page layout tests to regenerate screenshots. - @echo "Running page layout tests to update guide screenshots..." - @$(DEVSHELL) $(SDBIN)/update-user-guides +update-user-guides: ## Regenerate docs screenshots. Set DOCS_REPO_DIR to repo checkout root. +ifndef DOCS_REPO_DIR + $(error DOCS_REPO_DIR must be set to the documentation repo checkout root.) +endif + @echo "Running page layout tests to update screenshots used in user guide..." + @$(DEVSHELL) $(SDBIN)/generate-docs-screenshots + @echo "Copying screenshots..." + cp securedrop/tests/pageslayout/screenshots/en_US/*.png $${DOCS_REPO_DIR}/docs/images/manual/screenshots @echo diff --git a/securedrop/bin/update-user-guides b/securedrop/bin/generate-docs-screenshots similarity index 78% rename from securedrop/bin/update-user-guides rename to securedrop/bin/generate-docs-screenshots index 637abcaf7a2..f017a0eea00 100755 --- a/securedrop/bin/update-user-guides +++ b/securedrop/bin/generate-docs-screenshots @@ -15,4 +15,3 @@ maybe_create_config_py ./i18n_tool.py translate-messages --compile pytest -v --page-layout "${@:-tests/pageslayout}" -cp tests/pageslayout/screenshots/en_US/*.png ../docs/images/manual/screenshots