zip

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2022 License: MIT Imports: 7 Imported by: 3

Documentation

Overview

Package zip creates the "zip" package format for notarization.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Zip

func Zip(ctx context.Context, opts *Options) error

Zip creates a zip archive for notarization using the options given.

For now this works by subprocessing to "ditto" which is the recommended mechanism by the Apple documentation. We could in the future change to using pure Go but given the requirement of gon to run directly on macOS machines, we can be sure ditto exists and produces valid output.

Types

type Options

type Options struct {
	// Files to add to the zip package.
	Files []string

	// OutputPath is the path where the zip file will be written. The directory
	// containing this path must already exist. If a file already exist here
	// it will be overwritten.
	OutputPath string

	// Logger is the logger to use. If this is nil then no logging will be done.
	Logger hclog.Logger

	// BaseCmd is the base command for executing the codesign binary. This is
	// used for tests to overwrite where the codesign binary is.
	BaseCmd *exec.Cmd
}

Options are the options for creating the zip archive.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL