Function apple_codesign::notarization::bundle_to_zip
source · pub fn bundle_to_zip(
bundle: &DirectoryBundle
) -> Result<Vec<u8>, AppleCodesignError>Expand description
Produce zip file data from a DirectoryBundle.
The built zip file will contain all the files from the bundle under a directory
tree having the bundle name. e.g. if you pass MyApp.app, the zip will have
files like MyApp.app/Contents/Info.plist.
Examples found in repository?
src/notarization.rs (line 204)
199 200 201 202 203 204 205 206 207 208 209 210
pub fn notarize_bundle(
&self,
bundle: &DirectoryBundle,
wait_limit: Option<Duration>,
) -> Result<NotarizationUpload, AppleCodesignError> {
let zipfile = bundle_to_zip(bundle)?;
let digest = sha2::Sha256::digest(&zipfile);
let submission = self.create_submission(&digest, &format!("{}.zip", bundle.name()))?;
self.upload_s3_and_maybe_wait(submission, UploadKind::Data(zipfile), wait_limit)
}