fix(native_comp): improve handling of *.eln files in .app bundle

Specifically support latest changes in master which places *.eln files
within the .app bundle in "Contents/Frameworks".
This commit is contained in:
2021-07-01 23:33:50 +01:00
parent 28930381a8
commit 9019e73d60
2 changed files with 16 additions and 16 deletions

View File

@@ -117,11 +117,15 @@ func signCLIHelper(ctx context.Context, appBundle string, opts *Options) error {
}
// elnFiles finds all native-compilation *.eln files within a Emacs.app bundle,
// based on expected paths they might be stored in.
// excluding any *.eln which should be automatically located by codesign when
// signing the Emacs.app bundle itself with the --deep flag. Essentially this
// only returns *.eln files which must be individually signed before signing the
// app bundle itself.
func elnFiles(emacsApp string) ([]string, error) {
var files []string
walkDirFunc := func(path string, d fs.DirEntry, _err error) error {
if d.Type().IsRegular() && strings.HasSuffix(path, ".eln") {
if d.Type().IsRegular() && strings.HasSuffix(path, ".eln") &&
!strings.Contains(path, ".app/Contents/Frameworks/") {
files = append(files, path)
}