Skip to content

Commit f69e550

Browse files
committed
Write a digest for get-pip.py
1 parent ea1d9d6 commit f69e550

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/generate.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,12 @@ def generate_one(variant, mapping, *, console, pip_versions):
267267
with get_pip.open("w", newline=newline) as f:
268268
f.write(rendered_template)
269269

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

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

0 commit comments

Comments
 (0)