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; } 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(); + } }