Skip to content

Commit

Permalink
Write a digest for get-pip.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mcpate committed Mar 19, 2024
1 parent ea1d9d6 commit f69e550
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,12 @@ def generate_one(variant, mapping, *, console, pip_versions):
with get_pip.open("w", newline=newline) as f:
f.write(rendered_template)

# Write a digest of the script to the correct location
digest = destination / "get-pip.py.sha256"
console.log(f" Writing [blue]{digest}")
with digest.open("w", newline=newline) as f:
f.write(hashlib.sha256(rendered_template.encode("utf-8")).hexdigest())


def generate_moved(destination: str, *, location: str, console: Console):
template = Path("templates") / "moved.py"
Expand Down

0 comments on commit f69e550

Please sign in to comment.