This is an automated email from the ASF dual-hosted git repository.

erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-node-xcode.git


The following commit(s) were added to refs/heads/master by this push:
     new 04fc2dd  feat: support for 'alwaysOutOfDate' PBX Shell Script property 
(#173)
04fc2dd is described below

commit 04fc2ddac090a695b5ff2a3352236df25a70bc0a
Author: エリス <[email protected]>
AuthorDate: Thu Jun 18 19:08:22 2026 +0900

    feat: support for 'alwaysOutOfDate' PBX Shell Script property (#173)
    
    * Added support for 'alwaysOutOfDate' PBX Shell Script property
    * feat(alwaysOutOfDate): any truthy value to hard set to 1
    
    ---------
    
    Co-authored-by: Marco Saia <[email protected]>
---
 lib/pbxProject.js     |  6 ++++++
 test/addBuildPhase.js | 22 ++++++++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/lib/pbxProject.js b/lib/pbxProject.js
index 41bc398..25bd8f3 100644
--- a/lib/pbxProject.js
+++ b/lib/pbxProject.js
@@ -1621,6 +1621,12 @@ function pbxShellScriptBuildPhaseObj (obj, options, 
phaseName) {
         obj.runOnlyForDeploymentPostprocessing = 1;
     }
 
+    // By default, alwaysOutOfDate is not set and treated as false.
+    // Any truthy value, it will be set to 1, including any non-empty strings.
+    if (options.alwaysOutOfDate) {
+        obj.alwaysOutOfDate = 1;
+    }
+
     return obj;
 }
 
diff --git a/test/addBuildPhase.js b/test/addBuildPhase.js
index d3249b9..5d1ace2 100644
--- a/test/addBuildPhase.js
+++ b/test/addBuildPhase.js
@@ -197,4 +197,26 @@ describe('addBuildPhase', () => {
         const buildPhase = proj.addBuildPhase([], 'PBXShellScriptBuildPhase', 
'Run a script', proj.getFirstTarget().uuid, options).buildPhase;
         assert.equal(buildPhase.runOnlyForDeploymentPostprocessing, 1);
     });
+
+    it('should add the PBXBuildPhase with alwaysOutOfDate property', () => {
+        const options = {
+            shellPath: '/bin/sh',
+            shellScript: 'test',
+            alwaysOutOfDate: true
+        };
+
+        const buildPhase = proj.addBuildPhase([], 'PBXShellScriptBuildPhase', 
'Run a script', proj.getFirstTarget().uuid, options).buildPhase;
+        assert.equal(buildPhase.shellPath, '/bin/sh');
+        assert.equal(buildPhase.shellScript, '"test"');
+        assert.strictEqual(buildPhase.alwaysOutOfDate, 1);
+    });
+
+    it('should add the PBXBuildPhase without alwaysOutOfDate property', () => {
+        const options = { shellPath: '/bin/sh', shellScript: 'test' };
+
+        const buildPhase = proj.addBuildPhase([], 'PBXShellScriptBuildPhase', 
'Run a script', proj.getFirstTarget().uuid, options).buildPhase;
+        assert.equal(buildPhase.shellPath, '/bin/sh');
+        assert.equal(buildPhase.shellScript, '"test"');
+        assert.strictEqual(buildPhase.alwaysOutOfDate, undefined);
+    });
 });


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to