Skip to content

Commit 216f28c

Browse files
committed
fix(cli): simplify version output in release process
- Modified the release command to only output the new version number to stdout when a release occurs, removing additional descriptive text for better CI/CD integration. - Ensured that when no new version is released, an explicit message is output to stderr for clarity. **Enhancements & Refinements** - Streamlined CLI output to facilitate automated tools by providing only the version string on success. - Clarified message for no-release scenario to stderr for better log handling.
1 parent 5a2ce17 commit 216f28c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

avcmt/cli/release.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,16 @@ def run_release_command(
6666
# 2. Run the release process with arguments from the CLI.
6767
new_version = releaser.run(dry_run=dry_run, push=push)
6868

69-
# If successful and there is a new version, print it to stdout (for CI/CD output)
69+
# Perubahan: Hanya cetak nomor versi ke stdout untuk penangkapan CI/CD.
70+
# Pesan deskriptif lain harus ke logger.info atau typer.echo(..., err=True)
7071
if new_version:
71-
typer.echo(f"New version released: {new_version}")
72+
typer.echo(new_version) # HANYA mencetak versi, tanpa teks tambahan
7273
logger.info(f"Release process finished. New version: {new_version}")
7374
else:
74-
typer.echo(
75-
"No new version released (e.g., no semantic commits or dry-run)."
75+
# Jika tidak ada versi baru, output pesan deskriptif ke stderr atau log
76+
typer.secho(
77+
"No new version released (e.g., no semantic commits or dry-run).",
78+
err=True,
7679
)
7780
logger.info("Release process finished. No new version released.")
7881

0 commit comments

Comments
 (0)