Skip to content

Commit

Permalink
add change file
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog-crabnebula committed Apr 14, 2024
1 parent 936622e commit d0f4df0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/app-bundle-cross-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"cargo-packager": minor
---

Allow packaging the macOS app bundle on Linux and Windows hosts (without codesign support).
5 changes: 5 additions & 0 deletions .changes/package-output-struct-refactor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"cargo-packager": minor
---

Renamed `PackageOuput` to `PackageOutput` and added `PackageOutput::new`.
11 changes: 11 additions & 0 deletions crates/packager/src/package/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,24 @@ mod context;

/// Generated Package metadata.
#[derive(Debug, Clone)]
#[non_exhaustive]
pub struct PackageOutput {
/// The package type.
pub format: PackageFormat,
/// All paths for this package.
pub paths: Vec<PathBuf>,
}

impl PackageOutput {
/// Creates a new package output.
///
/// This is only useful if you need to sign the packages in a different process,
/// after packaging the app and storing its paths.
pub fn new(format: PackageFormat, paths: Vec<PathBuf>) -> Self {
Self { format, paths }
}
}

/// Package an app using the specified config.
#[tracing::instrument(level = "trace")]
pub fn package(config: &Config) -> crate::Result<Vec<PackageOutput>> {
Expand Down

0 comments on commit d0f4df0

Please sign in to comment.