Skip to content

Commit

Permalink
Error out on any changes to files in the repository after generation
Browse files Browse the repository at this point in the history
This ensures that the generated files match exactly what `generate.py`
would generate.
  • Loading branch information
pradyunsg committed Jan 30, 2023
1 parent f35cd18 commit 5326567
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import shutil
import textwrap
import webbrowser
from pathlib import Path
Expand Down Expand Up @@ -42,6 +43,9 @@ def generate(session):
"""Update the scripts, to the latest versions."""
session.install("packaging", "requests", "cachecontrol[filecache]", "rich", "pkg_metadata")

public = Path("public")
shutil.rmtree(public, ignore_errors=True)

session.run("python", "scripts/generate.py")


Expand Down

0 comments on commit 5326567

Please sign in to comment.