Compare commits

...

2 Commits

Author SHA1 Message Date
97178bf77a chore(release): 0.6.20 2021-10-23 20:35:09 +01:00
591c39e629 fix(notarization): explicitly only copy *.c and *.h C source files
Previously we just copies the whole "src" directory from the workdir, it
turns out it has some binary files after a successful build, which
caused Apple's notarization process to fail.

As we actually only care about the *.c and *.h files from the "src"
directory, let's explicitly only copy those files.
2021-10-23 20:32:13 +01:00
2 changed files with 20 additions and 5 deletions

View File

@@ -2,6 +2,13 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [0.6.20](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.19...v0.6.20) (2021-10-23)
### Bug Fixes
* **notarization:** explicitly only copy *.c and *.h C source files ([591c39e](https://github.com/jimeh/build-emacs-for-macos/commit/591c39e629c9556adcf296cd5c15dd0b17c4d986))
### [0.6.19](https://github.com/jimeh/build-emacs-for-macos/compare/v0.6.18...v0.6.19) (2021-10-23)

View File

@@ -797,7 +797,10 @@ class AbstractEmbedder
end
class CSourcesEmbedder < AbstractEmbedder
PATH_PATCH = '(setq source-directory (expand-file-name ".."))'
attr_reader :source_dir
def initialize(app, source_dir)
super(app)
@@ -807,13 +810,18 @@ class CSourcesEmbedder < AbstractEmbedder
def embed
info 'Embedding C source files into Emacs.app for documentation purposes'
FileUtils.cp_r(
File.join(source_dir, 'src'),
File.join(resources_dir, 'src')
)
src_dir = File.join(source_dir, 'src')
Dir[File.join(src_dir, '**', '*.{c,h}')].each do |f|
rel = f[src_dir.size + 1..-1]
target = File.join(resources_dir, 'src', rel)
FileUtils.mkdir_p(File.dirname(target))
FileUtils.cp(f, target)
end
return if File.read(subdirs_el_file).include?(PATH_PATCH)
File.open(subdirs_el_file, 'a') do |f|
f.puts("(setq source-directory (expand-file-name \"..\"))\n")
f.puts("\n#{PATH_PATCH}")
end
end