Skip to content

Commit

Permalink
Build CLI: Fix MacOS notarize logs
Browse files Browse the repository at this point in the history
* Print logs before checking the status of the notarize command.
* Hide credentials from output logs.
* Update tool version & Add changes to change log
  • Loading branch information
AmmarAbouZor authored and DmitryAstafyev committed Nov 11, 2024
1 parent cc22ef8 commit 0cce68d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
7 changes: 7 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 0.2.9

## Fixes:

* Show notarize command logs before checking its status to ensure that logs will be always printed.
* Hide credentials when printing notarize command.

# 0.2.8

## Features:
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-chipmunk"
version = "0.2.8"
version = "0.2.9"
authors = ["Ammar Abou Zor <[email protected]>"]
edition = "2021"
description = "CLI Tool for chipmunk application development"
Expand Down
13 changes: 8 additions & 5 deletions cli/src/release/codesign/macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,6 @@ pub fn notarize(config: &MacOsConfig) -> anyhow::Result<()> {
.output()
.context("Error while running notarize command.")?;

ensure!(
cmd_output.status.success(),
"Code notarize failed. Command : '{cmd}'"
);

let mut accepted = false;

println!("Notarize commnad output on stdout:");
Expand All @@ -244,6 +239,14 @@ pub fn notarize(config: &MacOsConfig) -> anyhow::Result<()> {
}
}

ensure!(
cmd_output.status.success(),
"Code notarize failed. Command : '{}'",
cmd.replace(&apple_id, "***")
.replace(&team_id, "***")
.replace(&password, "***")
);

ensure!(
accepted,
r"Accepted line couldn't be found in notarize command output
Expand Down

0 comments on commit 0cce68d

Please sign in to comment.