Add lock files to rendered output.

This will make it possible to easily reproduce a particular release
version without having to download the installer.
This commit is contained in:
Ryan Volz 2021-03-22 18:47:19 -04:00
parent 17852168db
commit 95f42f3787

View File

@ -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