From 5d563ad7b9f54a9ecc5534784296e4aac0f24a4a Mon Sep 17 00:00:00 2001 From: Brett Walker Date: Mon, 2 Jan 2017 21:03:00 +0100 Subject: [PATCH 1/2] =?UTF-8?q?When=20code=20signing,=20a=20connection=20t?= =?UTF-8?q?o=20the=20Apple=20time=20servers=20is=20required.=20If=20you?= =?UTF-8?q?=E2=80=99re=20building=20without=20an=20internet=20connection?= =?UTF-8?q?=20(airplane,=20train,=20etc),=20then=20can=20be=20impossible?= =?UTF-8?q?=20to=20build.=20=20Particularly=20when=20you=20need=20to=20use?= =?UTF-8?q?=20code=20signing=20during=20development.=20=20Implemented=20th?= =?UTF-8?q?e=20`codesign=5Fdisable=5Ftimestamp`=20config=20variable=20to?= =?UTF-8?q?=20pass=20the=20`=E2=80=94timestamp=3Dnone`=20flag=20to=20the?= =?UTF-8?q?=20`codesign`=20executable.=20=20Defaults=20to=20false.=20=20On?= =?UTF-8?q?ly=20for=20macOS=20at=20the=20moment.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/motion/project/template/osx/builder.rb | 1 + lib/motion/project/xcode_config.rb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/motion/project/template/osx/builder.rb b/lib/motion/project/template/osx/builder.rb index e7c38d68..bd38e591 100644 --- a/lib/motion/project/template/osx/builder.rb +++ b/lib/motion/project/template/osx/builder.rb @@ -107,6 +107,7 @@ def codesign_bundle(config, bundle, deep = false) command = "/usr/bin/codesign --force --sign '#{config.codesign_certificate}' " command << "--deep " if deep command << "--entitlements '#{entitlements_path}' " if entitlements_path + command << "--timestamp=none " if config.codesign_disable_timestamp command << "'#{bundle}'" sh(command) end diff --git a/lib/motion/project/xcode_config.rb b/lib/motion/project/xcode_config.rb index eaba70d7..dcd402df 100644 --- a/lib/motion/project/xcode_config.rb +++ b/lib/motion/project/xcode_config.rb @@ -32,7 +32,7 @@ module Motion; module Project class XcodeConfig < Config variable :xcode_dir, :sdk_version, :deployment_target, :frameworks, :weak_frameworks, :embedded_frameworks, :external_frameworks, :framework_search_paths, - :libs, :identifier, :codesign_certificate, :short_version, :entitlements, :delegate_class, :embed_dsym, + :libs, :identifier, :codesign_certificate, :codesign_disable_timestamp, :short_version, :entitlements, :delegate_class, :embed_dsym, :version def initialize(project_dir, build_mode) @@ -53,6 +53,7 @@ def initialize(project_dir, build_mode) @embed_dsym = (development? ? true : false) @vendor_projects = [] @version = '1.0' + @codesign_disable_timestamp = false end def xcode_dir=(xcode_dir) From 55b1a47f91720e34c947f3f8a44835c2aba3f897 Mon Sep 17 00:00:00 2001 From: Brett Walker Date: Tue, 3 Jan 2017 12:06:35 +0100 Subject: [PATCH 2/2] Default `codesign_disable_timestamp` to true when in development --- lib/motion/project/xcode_config.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/motion/project/xcode_config.rb b/lib/motion/project/xcode_config.rb index dcd402df..c01f4ed5 100644 --- a/lib/motion/project/xcode_config.rb +++ b/lib/motion/project/xcode_config.rb @@ -53,7 +53,7 @@ def initialize(project_dir, build_mode) @embed_dsym = (development? ? true : false) @vendor_projects = [] @version = '1.0' - @codesign_disable_timestamp = false + @codesign_disable_timestamp = (development? ? true : false) end def xcode_dir=(xcode_dir)