From f418483eb1995bb06360eca309d006f364357cd2 Mon Sep 17 00:00:00 2001 From: Vijay Sharma Date: Sun, 10 Nov 2019 14:35:32 -0500 Subject: [PATCH 1/2] Add support for runOnlyForDeploymentPostprocessing --- lib/pbxProject.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pbxProject.js b/lib/pbxProject.js index 3097678..61c062a 100644 --- a/lib/pbxProject.js +++ b/lib/pbxProject.js @@ -1609,6 +1609,7 @@ function pbxShellScriptBuildPhaseObj(obj, options, phaseName) { obj.outputPaths = options.outputPaths || []; obj.shellPath = options.shellPath; obj.shellScript = '"' + options.shellScript.replace(/"/g, '\\"') + '"'; + obj.runOnlyForDeploymentPostprocessing = options.runOnlyForDeploymentPostprocessing || 0; return obj; } From 0eaf5009a1fc7a138f6466e11f908928e484f523 Mon Sep 17 00:00:00 2001 From: Vijay Sharma Date: Sun, 10 Nov 2019 14:45:00 -0500 Subject: [PATCH 2/2] Add Test for runOnlyForDeploymentPostprocessing --- test/addBuildPhase.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/addBuildPhase.js b/test/addBuildPhase.js index eb105f8..7d180b8 100644 --- a/test/addBuildPhase.js +++ b/test/addBuildPhase.js @@ -194,4 +194,11 @@ exports.addBuildPhase = { test.equal(buildPhase.shellScript, '"echo \\"hello world!\\""'); test.done(); }, + 'should add runOnlyForDeploymentPostprocessing option to run scripts': function (test) { + var options = {shellPath: '/bin/sh', shellScript: 'echo "hello world!"', runOnlyForDeploymentPostprocessing: 1}; + var buildPhase = proj.addBuildPhase([], 'PBXShellScriptBuildPhase', 'Run a script', proj.getFirstTarget().uuid, options).buildPhase; + + test.equal(buildPhase.runOnlyForDeploymentPostprocessing, 1); + test.done(); + } }