This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 935a5dd0fb6 Make updated pyproject.toml output only on verbose/dry_run 
and fold (#48716)
935a5dd0fb6 is described below

commit 935a5dd0fb65cd89cc20b0a92f0080a90cd56379
Author: Jarek Potiuk <[email protected]>
AuthorDate: Thu Apr 3 03:05:30 2025 +0200

    Make updated pyproject.toml output only on verbose/dry_run and fold (#48716)
    
    The output of the dynamically modified pyproject.toml when you
    add suffix is useful for deugging but it should only be shown
    when `--verbose` flag is passed (or `--dry-run`). Also in CI
    (which is always run in verbose mode) we should fold the
    output so that it does not clutter the output and need unfolding
    to see the content.
---
 .../src/airflow_breeze/commands/release_management_commands.py    | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/dev/breeze/src/airflow_breeze/commands/release_management_commands.py 
b/dev/breeze/src/airflow_breeze/commands/release_management_commands.py
index 0dc96851060..435402f3180 100644
--- a/dev/breeze/src/airflow_breeze/commands/release_management_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/release_management_commands.py
@@ -430,9 +430,11 @@ def 
update_version_suffix_in_pyproject_toml(version_suffix: str, pyproject_toml_
         updated_lines.append(line)
     new_content = "\n".join(updated_lines) + "\n"
     get_console().print(f"[info]Writing updated content to 
{pyproject_toml_path}.\n")
-    # Format the content to make it more readable with rich
-    syntax = Syntax(new_content, "toml", theme="ansi_dark", line_numbers=True)
-    get_console().print(syntax)
+    if get_verbose() or get_dry_run():
+        with ci_group(f"Updated {pyproject_toml_path} content", 
message_type=MessageType.INFO):
+            # Format the content to make it more readable with rich
+            syntax = Syntax(new_content, "toml", theme="ansi_dark", 
line_numbers=True)
+            get_console().print(syntax)
     pyproject_toml_path.write_text(new_content)
 
 

Reply via email to