[OSX] fix a bug where it is not possible to submit app to Mac App Store

We have to do the code sign twice to submit app

1. code sign to app with
  "3rd Party Mac Developer Application: XXX"

2. code sign to pkg with
  "3rd Party Mac Developer Installer: XXX"
This commit is contained in:
Watson
2013-06-09 17:10:28 +09:00
parent b35c1ab341
commit 3764e3d438

View File

@@ -31,7 +31,12 @@ module Motion; module Project
archive = config.archive
if !File.exist?(archive) or File.mtime(app_bundle) > File.mtime(archive)
App.info 'Create', archive
sh "/usr/bin/productbuild --quiet --component \"#{app_bundle}\" /Applications \"#{archive}\""
codesign = begin
if config.distribution_mode
"--sign \"" + config.codesign_certificate.sub(/Application/, "Installer") + "\""
end
end || ""
sh "/usr/bin/productbuild --quiet --component \"#{app_bundle}\" /Applications \"#{archive}\" #{codesign}"
end
end