From 7e7c42955ebfc9853458aa3666237c75d9d3d7f8 Mon Sep 17 00:00:00 2001 From: ori-shem-tov <45538125+ori-shem-tov@users.noreply.github.com> Date: Mon, 26 Aug 2024 09:26:01 +0300 Subject: [PATCH] chore: log deployment message only if deployer is present (#56) * chore: log deployment message only if deployer is present --- .../smart_contracts/__main__.py | 2 +- .../smart_contracts/__main__.py | 2 +- examples/production_python/smart_contracts/__main__.py | 2 +- examples/starter_python/smart_contracts/__main__.py | 2 +- template_content/smart_contracts/__main__.py.jinja | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/generators/production_python_smart_contract_python/smart_contracts/__main__.py b/examples/generators/production_python_smart_contract_python/smart_contracts/__main__.py index 4e15bf3..9c691ba 100644 --- a/examples/generators/production_python_smart_contract_python/smart_contracts/__main__.py +++ b/examples/generators/production_python_smart_contract_python/smart_contracts/__main__.py @@ -39,7 +39,6 @@ def main(action: str, contract_name: str | None = None) -> None: build(artifact_path / contract.name, contract.path) case "deploy": for contract in filtered_contracts: - logger.info(f"Deploying app {contract.name}") output_dir = artifact_path / contract.name app_spec_file_name = next( ( @@ -53,6 +52,7 @@ def main(action: str, contract_name: str | None = None) -> None: raise Exception("Could not deploy app, .arc32.json file not found") app_spec_path = output_dir / app_spec_file_name if contract.deploy: + logger.info(f"Deploying app {contract.name}") deploy(app_spec_path, contract.deploy) case "all": for contract in filtered_contracts: diff --git a/examples/generators/starter_python_smart_contract_python/smart_contracts/__main__.py b/examples/generators/starter_python_smart_contract_python/smart_contracts/__main__.py index 4e15bf3..9c691ba 100644 --- a/examples/generators/starter_python_smart_contract_python/smart_contracts/__main__.py +++ b/examples/generators/starter_python_smart_contract_python/smart_contracts/__main__.py @@ -39,7 +39,6 @@ def main(action: str, contract_name: str | None = None) -> None: build(artifact_path / contract.name, contract.path) case "deploy": for contract in filtered_contracts: - logger.info(f"Deploying app {contract.name}") output_dir = artifact_path / contract.name app_spec_file_name = next( ( @@ -53,6 +52,7 @@ def main(action: str, contract_name: str | None = None) -> None: raise Exception("Could not deploy app, .arc32.json file not found") app_spec_path = output_dir / app_spec_file_name if contract.deploy: + logger.info(f"Deploying app {contract.name}") deploy(app_spec_path, contract.deploy) case "all": for contract in filtered_contracts: diff --git a/examples/production_python/smart_contracts/__main__.py b/examples/production_python/smart_contracts/__main__.py index 4e15bf3..9c691ba 100644 --- a/examples/production_python/smart_contracts/__main__.py +++ b/examples/production_python/smart_contracts/__main__.py @@ -39,7 +39,6 @@ def main(action: str, contract_name: str | None = None) -> None: build(artifact_path / contract.name, contract.path) case "deploy": for contract in filtered_contracts: - logger.info(f"Deploying app {contract.name}") output_dir = artifact_path / contract.name app_spec_file_name = next( ( @@ -53,6 +52,7 @@ def main(action: str, contract_name: str | None = None) -> None: raise Exception("Could not deploy app, .arc32.json file not found") app_spec_path = output_dir / app_spec_file_name if contract.deploy: + logger.info(f"Deploying app {contract.name}") deploy(app_spec_path, contract.deploy) case "all": for contract in filtered_contracts: diff --git a/examples/starter_python/smart_contracts/__main__.py b/examples/starter_python/smart_contracts/__main__.py index 4e15bf3..9c691ba 100644 --- a/examples/starter_python/smart_contracts/__main__.py +++ b/examples/starter_python/smart_contracts/__main__.py @@ -39,7 +39,6 @@ def main(action: str, contract_name: str | None = None) -> None: build(artifact_path / contract.name, contract.path) case "deploy": for contract in filtered_contracts: - logger.info(f"Deploying app {contract.name}") output_dir = artifact_path / contract.name app_spec_file_name = next( ( @@ -53,6 +52,7 @@ def main(action: str, contract_name: str | None = None) -> None: raise Exception("Could not deploy app, .arc32.json file not found") app_spec_path = output_dir / app_spec_file_name if contract.deploy: + logger.info(f"Deploying app {contract.name}") deploy(app_spec_path, contract.deploy) case "all": for contract in filtered_contracts: diff --git a/template_content/smart_contracts/__main__.py.jinja b/template_content/smart_contracts/__main__.py.jinja index 01b25b7..a0c4fee 100644 --- a/template_content/smart_contracts/__main__.py.jinja +++ b/template_content/smart_contracts/__main__.py.jinja @@ -42,7 +42,6 @@ def main(action: str, contract_name: str | None = None) -> None: {%- if deployment_language == 'python' %} case "deploy": for contract in filtered_contracts: - logger.info(f"Deploying app {contract.name}") output_dir = artifact_path / contract.name app_spec_file_name = next( ( @@ -56,6 +55,7 @@ def main(action: str, contract_name: str | None = None) -> None: raise Exception("Could not deploy app, .arc32.json file not found") app_spec_path = output_dir / app_spec_file_name if contract.deploy: + logger.info(f"Deploying app {contract.name}") deploy(app_spec_path, contract.deploy) case "all": for contract in filtered_contracts: