From 95f42f3787a52348a3852e346ce0bf18298b7be3 Mon Sep 17 00:00:00 2001 From: Ryan Volz Date: Mon, 22 Mar 2021 18:47:19 -0400 Subject: [PATCH] Add lock files to rendered output. This will make it possible to easily reproduce a particular release version without having to download the installer. --- rerender.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rerender.py b/rerender.py index 780d3eb..3f5fd5d 100755 --- a/rerender.py +++ b/rerender.py @@ -103,6 +103,15 @@ def render_constructor_specs( with construct_yaml_path.open("w") as f: yaml.safe_dump(construct_dict, stream=f) + lockfile_contents = [ + f"# platform: {rendered_lock_spec.platform}", + f"# env_hash: {rendered_lock_spec.env_hash()}", + ] + lockfile_contents.extend(rendered_lock_spec.specs) + lock_file_path = constructor_dir / f"{constructor_name}.txt" + with lock_file_path.open("w") as f: + f.writelines(s + "\n" for s in lockfile_contents) + return constructor_specs