diff --git a/conda-store-server/conda_store_server/action/generate_constructor_installer.py b/conda-store-server/conda_store_server/action/generate_constructor_installer.py index 8d90ee158..6bce2e8f6 100644 --- a/conda-store-server/conda_store_server/action/generate_constructor_installer.py +++ b/conda-store-server/conda_store_server/action/generate_constructor_installer.py @@ -14,6 +14,7 @@ def action_generate_constructor_installer( conda_command: str, specification: schema.CondaSpecification, installer_dir: pathlib.Path, + version: str, ): # Helpers def print_cmd(cmd): @@ -58,8 +59,7 @@ def write_file(filename, s): "name": specification.name, "channels": specification.channels, "specs": dependencies, - # XXX: This is required: use the env hash and datetime? - "version": 1, + "version": version, } if sys.platform == "win32": diff --git a/conda-store-server/conda_store_server/build.py b/conda-store-server/conda_store_server/build.py index 063d8c91c..679f6fc8d 100644 --- a/conda-store-server/conda_store_server/build.py +++ b/conda-store-server/conda_store_server/build.py @@ -403,6 +403,7 @@ def build_constructor_installer(db: Session, conda_store, build: orm.Build): build.specification.spec ), installer_dir=pathlib.Path(tmpdir), + version=build.build_key, ) output_filename = context.result append_to_logs( diff --git a/conda-store-server/tests/test_actions.py b/conda-store-server/tests/test_actions.py index 71d625735..df5d91a65 100644 --- a/conda-store-server/tests/test_actions.py +++ b/conda-store-server/tests/test_actions.py @@ -129,6 +129,7 @@ def test_generate_constructor_installer(conda_store, specification_name, request conda_command=conda_store.conda_command, specification=specification, installer_dir=installer_dir, + version="1", ) # Checks that the installer was created