wails-release/internal/archive/archive.go

23 lines
552 B
Go
Raw Permalink Normal View History

package archive
import (
"context"
"fmt"
2026-05-02 01:47:13 +00:00
"lmika.dev/actions/wails-release/internal/runner"
)
// ZipApp wraps a .app bundle into a .app.zip via ditto, preserving
// extended attributes and producing an archive Apple's notary service
// will accept.
func ZipApp(ctx context.Context, r runner.Runner, app, zipPath string) error {
_, err := r.Run(ctx, runner.Spec{
Name: "ditto",
Args: []string{"-c", "-k", "--keepParent", app, zipPath},
})
if err != nil {
return fmt.Errorf("ditto archive %s -> %s: %w", app, zipPath, err)
}
return nil
}