Skip to content

Commit

Permalink
Add support for docs repo to update-user-guides target
Browse files Browse the repository at this point in the history
The script is run inside a container that does not have access to
the repo checkout, so moved the copy logic into the Makefile.

Renamed script to accurately reflect its revised purpose.
  • Loading branch information
eloquence committed Sep 24, 2020
1 parent 50145a4 commit af737f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit af737f6

Please sign in to comment.