Skip to content

Commit

Permalink
docs(macos): explicitly mention which fields are skipped (#255)
Browse files Browse the repository at this point in the history
* docs(macos): explicitly mention which fields are skipped

New users may be confused when looking at the docs for `Config`
and other config-like structs, as some fields cannot be specified
in config files or via Cargo's package metadata.
This commit clarifies that those fields are intentionally excluded.

Also added an example of a macOS developer signing identity.

* add change file
  • Loading branch information
kevinaboos committed Jun 29, 2024
1 parent 7b234b5 commit 753ec77
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .changes/pr255.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"cargo-packager": "patch"
"@crabnebula/packager": "patch"
---

Explicitly mention which fields in `Config` and other configuration structs
are skipped during deserialization.
This reduces confusion for new users looking at the docs for `Config`,
who may receive unexpected errors when attempting to specify skipped fields
in their config files or Cargo package metadata.

8 changes: 8 additions & 0 deletions crates/packager/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -624,15 +624,23 @@ pub struct MacOsConfig {
#[serde(alias = "exception-domain", alias = "exception_domain")]
pub exception_domain: Option<String>,
/// Code signing identity.
///
/// This is typically of the form: `"Developer ID Application: TEAM_NAME (TEAM_ID)"`.
#[serde(alias = "signing-identity", alias = "signing_identity")]
pub signing_identity: Option<String>,
/// Codesign certificate (base64 encoded of the p12 file).
///
/// Note: this field cannot be specified via a config file or Cargo package metadata.
#[serde(skip)]
pub signing_certificate: Option<OsString>,
/// Password of the codesign certificate.
///
/// Note: this field cannot be specified via a config file or Cargo package metadata.
#[serde(skip)]
pub signing_certificate_password: Option<OsString>,
/// Notarization authentication credentials.
///
/// Note: this field cannot be specified via a config file or Cargo package metadata.
#[serde(skip)]
pub notarization_credentials: Option<MacOsNotarizationCredentials>,
/// Provider short name for notarization.
Expand Down

0 comments on commit 753ec77

Please sign in to comment.