Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Commit

Permalink
Run Makefile targets under poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
eloquence committed Feb 9, 2023
1 parent f40322f commit 599c26b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- run:
name: Run lint
command: |
poetry run make docs-lint
make docs-lint
linkcheck:
docker:
Expand All @@ -32,7 +32,7 @@ jobs:
- run:
name: Run link check
command: |
poetry run make docs-linkcheck
make docs-linkcheck
build:
docker:
Expand Down
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
# All targets are run under poetry, so the activation of the virtual environment
# is not necessary.
.PHONY: docs
docs: ## Build project documentation with live reload for editing.
@echo "███ Building docs and watching for changes..."
make clean && sphinx-autobuild docs docs/_build/html
@poetry run make clean && poetry run sphinx-autobuild docs docs/_build/html
@echo

.PHONY: docs-lint
docs-lint: ## Check documentation for common syntax errors.
@echo "███ Linting documentation..."
# The `-W` option converts warnings to errors.
# The `-n` option enables "nit-picky" mode.
@make clean && sphinx-build -Wn docs docs/_build/html
@make clean && poetry run sphinx-build -Wn docs docs/_build/html
@echo

.PHONY: docs-linkcheck
docs-linkcheck: ## Check documentation for broken links.
@make clean && sphinx-build -b linkcheck -Wn docs docs/_build/html
@make clean && poetry run sphinx-build -b linkcheck -Wn docs docs/_build/html
@echo

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%:
@sphinx-build -M $@ docs docs/_build
@poetry run sphinx-build -M $@ docs docs/_build
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ This repository holds the [documentation](https://support-docs.securedrop.org/)

1. [Install poetry](https://python-poetry.org/docs/#installation)
2. Install the dependencies using `poetry install`
3. Enter the virtual environment using `poetry shell`
4. Run `make docs` to preview the documentation.
3. Run `make docs` to preview the documentation.
2 changes: 1 addition & 1 deletion deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ COPY ./ .
RUN pip install --upgrade pip
RUN pip install poetry
RUN poetry install
RUN poetry run deploy/build $GIT_BRANCH
RUN deploy/build $GIT_BRANCH

# sha256 as of 2023-01-09

Expand Down

0 comments on commit 599c26b

Please sign in to comment.