Skip to content

Commit

Permalink
Fixes for install and docs targets when contributing on Windows (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
redruin1 committed Aug 29, 2023
1 parent 2b8bea3 commit 966ea40
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/plugins/main.py
Expand Up @@ -61,15 +61,15 @@ def on_page_markdown(markdown: str, page: Page, config: Config, files: Files) ->


def add_changelog() -> None:
history = (PROJECT_ROOT / 'HISTORY.md').read_text()
history = (PROJECT_ROOT / 'HISTORY.md').read_text(encoding='utf-8')
history = re.sub(r'(\s)@([\w\-]+)', r'\1[@\2](https://github.com/\2)', history, flags=re.I)
history = re.sub(r'\[GitHub release]\(', r'[:simple-github: GitHub release](', history)
history = re.sub('@@', '@', history)
new_file = DOCS_DIR / 'changelog.md'

# avoid writing file unless the content has changed to avoid infinite build loop
if not new_file.is_file() or new_file.read_text() != history:
new_file.write_text(history)
if not new_file.is_file() or new_file.read_text(encoding='utf-8') != history:
new_file.write_text(history, encoding='utf-8')


MIN_MINOR_VERSION = 7
Expand Down
2 changes: 1 addition & 1 deletion pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -114,7 +114,7 @@ mypy = [
"pydantic-settings>=2.0.0",
]
memray = [
"pytest-memray",
"pytest-memray; platform_system != 'Windows'",
]

[tool.pdm.resolution.overrides]
Expand Down

0 comments on commit 966ea40

Please sign in to comment.