Skip to content

Commit

Permalink
Merge pull request #4150 from tybug/fix-deploy-docs
Browse files Browse the repository at this point in the history
Fix deploy docs
  • Loading branch information
Zac-HD authored Oct 29, 2024
2 parents 21502ba + 3b088c0 commit 3c128e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tooling/src/hypothesistooling/projects/hypothesispython.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@ def has_source_changes():
return tools.has_changes([PYTHON_SRC])


def build_docs(builder="html"):
def build_docs(*, builder="html", only=()):
# See https://www.sphinx-doc.org/en/stable/man/sphinx-build.html
# (unfortunately most options only have the short flag version)
tools.scripts.pip_tool(
"sphinx-build",
"-W",
"--keep-going",
"-T",
"-E",
"-b",
builder,
"docs",
"docs/_build/" + builder,
*only,
cwd=HYPOTHESIS_PYTHON,
)

Expand Down Expand Up @@ -189,7 +189,7 @@ def upload_distribution():

# Construct plain-text + markdown version of this changelog entry,
# with link to canonical source.
build_docs(builder="text")
build_docs(builder="text", only=["docs/changes.rst"])
textfile = os.path.join(HYPOTHESIS_PYTHON, "docs", "_build", "text", "changes.txt")
with open(textfile, encoding="utf-8") as f:
lines = f.readlines()
Expand All @@ -207,7 +207,7 @@ def upload_distribution():
"https://api.github.com/repos/HypothesisWorks/hypothesis/releases",
headers={
"Accept": "application/vnd.github+json",
"Authorization": f"Bearer: {os.environ['GH_TOKEN']}",
"Authorization": f"Bearer {os.environ['GH_TOKEN']}",
"X-GitHub-Api-Version": "2022-11-28",
},
json={
Expand Down

0 comments on commit 3c128e7

Please sign in to comment.