summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/tools/third_party/pytest/scripts/towncrier-draft-to-file.py
blob: 81507b40b75fd9fb95f956a1a5429c918e34be8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import sys
from subprocess import call


def main():
    """
    Platform agnostic wrapper script for towncrier.
    Fixes the issue (#7251) where windows users are unable to natively run tox -e docs to build pytest docs.
    """
    with open("doc/en/_changelog_towncrier_draft.rst", "w") as draft_file:
        return call(("towncrier", "--draft"), stdout=draft_file)


if __name__ == "__main__":
    sys.exit(main())