You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by adzellman <gi...@git.apache.org> on 2016/10/06 21:41:09 UTC

[GitHub] cordova-ios pull request #265: CB-11952 - Introduce buildFlag option

GitHub user adzellman opened a pull request:

    https://github.com/apache/cordova-ios/pull/265

    CB-11952 - Introduce buildFlag option

    ### Platforms affected
    iOS
    
    ### What does this PR do?
    
    - adds buildFlag option for passing args to xcodebuild
    - There can be multiple --buildFlag declarations
    - Warns if buildFlag would override a built-in setting
    
    ### What testing has been done on this change?
    
    - Added unit tests for build.js
    - I have tried this out with by passing various legal and illegal flags using the --buildFlag option. I used the xcodebuild man page to develop test cases.
    
    ### Checklist
    - [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
    - [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
    - [ ] Added automated test coverage as appropriate for this change.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/adzellman/aemm-ios CB-11952

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-ios/pull/265.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #265
    
----
commit e393738fe1f26824555bd090d1e08a725ed75f88
Author: Andrew Zellman <ze...@adobe.com>
Date:   2016-10-05T22:14:59Z

    CB-11952 - Introduce buildFlag option
    - adds buildFlag option for passing args to xcodebuild
    - There can be multiple --buildFlag declarations
    - Warns if buildFlag would override a built-in setting

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-ios pull request #265: CB-11952 - Introduce buildFlag option

Posted by adzellman <gi...@git.apache.org>.
GitHub user adzellman reopened a pull request:

    https://github.com/apache/cordova-ios/pull/265

    CB-11952 - Introduce buildFlag option

    ### Platforms affected
    iOS
    
    ### What does this PR do?
    
    - adds buildFlag option for passing args to xcodebuild
    - There can be multiple --buildFlag declarations
    - Warns if buildFlag would override a built-in setting
    
    ### What testing has been done on this change?
    
    - Added unit tests for build.js
    - I have tried this out with by passing various legal and illegal flags using the --buildFlag option. I used the xcodebuild man page to develop test cases.
    
    ### Checklist
    - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
    - [x] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
    - [x] Added automated test coverage as appropriate for this change.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/adzellman/aemm-ios CB-11952

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-ios/pull/265.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #265
    
----
commit e393738fe1f26824555bd090d1e08a725ed75f88
Author: Andrew Zellman <ze...@adobe.com>
Date:   2016-10-05T22:14:59Z

    CB-11952 - Introduce buildFlag option
    - adds buildFlag option for passing args to xcodebuild
    - There can be multiple --buildFlag declarations
    - Warns if buildFlag would override a built-in setting

commit d614152e7eafd57527de7f37dee757250c3fa3ad
Author: Andrew Zellman <ze...@adobe.com>
Date:   2016-10-06T23:20:14Z

    Remove the optional import of check_reqs.
     - Use a try-catch instead, because it actually works.

commit 6d0cc7c56dc4e4e9c93e0a842e92c24964cc6d0e
Author: Andrew Zellman <ze...@adobe.com>
Date:   2016-10-06T23:26:30Z

    Use util for string formatting of warning.

commit cbf4bac766467c150657d09fd9b5956bbf285b9d
Author: Andrew Zellman <ze...@adobe.com>
Date:   2016-10-07T17:09:29Z

    Make changes for using workspace instead of project.

commit 68ab00a474ef947e5b2796e596cf23e5c3d8af75
Author: Andrew Zellman <ze...@adobe.com>
Date:   2016-10-08T01:12:03Z

    Merge branch 'master' of https://github.com/apache/cordova-ios into CB-11952

commit 2b221fd38170486756bc0667fdc62acc0ce8d011
Author: Andrew Zellman <ze...@adobe.com>
Date:   2016-10-08T03:04:10Z

    Fix up options in response to PR #257

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-ios pull request #265: CB-11952 - Introduce buildFlag option

Posted by adzellman <gi...@git.apache.org>.
Github user adzellman commented on a diff in the pull request:

    https://github.com/apache/cordova-ios/pull/265#discussion_r82491459
  
    --- Diff: bin/templates/scripts/cordova/lib/build.js ---
    @@ -199,33 +219,52 @@ module.exports.findXCodeProjectIn = findXCodeProjectIn;
      * @param  {Boolean} isDevice      Flag that specify target for package (device/emulator)
      * @return {Array}                 Array of arguments that could be passed directly to spawn method
      */
    -function getXcodeBuildArgs(projectName, projectPath, configuration, isDevice) {
    +function getXcodeBuildArgs(projectName, projectPath, configuration, isDevice, buildFlags) {
         var xcodebuildArgs;
    +    var options;
    +    var buildActions = [ 'build' ];
    +    var settings;
    +    var customArgs = {};
    +    customArgs.otherFlags = [];
    +
    +    if (buildFlags) {
    +        if (typeof buildFlags === 'string' || buildFlags instanceof String) {
    +            parseBuildFlag(buildFlags, customArgs);
    +        } else { // buildFlags is an Array of strings
    +            buildFlags.forEach( function(flag) {
    +                parseBuildFlag(flag, customArgs);
    +            });
    +        }
    +    }
    +    
         if (isDevice) {
    -        xcodebuildArgs = [
    -            '-xcconfig', path.join(__dirname, '..', 'build-' + configuration.toLowerCase() + '.xcconfig'),
    -            '-workspace', projectName + '.xcworkspace',
    -            '-scheme', projectName,
    -            '-configuration', configuration,
    -            '-destination', 'generic/platform=iOS',
    -            '-archivePath', projectName + '.xcarchive',
    -            'archive',
    --- End diff --
    
    Oh, it actually changed from the build command to the archive command. That's interesting.
    
    This was allowed in just a couple days ago with no automated tests. It'll take me a little bit to make sure I didn't break anything.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-ios issue #265: CB-11952 - Introduce buildFlag option

Posted by shazron <gi...@git.apache.org>.
Github user shazron commented on the issue:

    https://github.com/apache/cordova-ios/pull/265
  
    @adzellman you'll have to close then re-open this PR to trigger Travis (yeah its flaky)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-ios issue #265: CB-11952 - Introduce buildFlag option

Posted by adzellman <gi...@git.apache.org>.
Github user adzellman commented on the issue:

    https://github.com/apache/cordova-ios/pull/265
  
    @shazron All checks have passed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-ios issue #265: CB-11952 - Introduce buildFlag option

Posted by adzellman <gi...@git.apache.org>.
Github user adzellman commented on the issue:

    https://github.com/apache/cordova-ios/pull/265
  
    I'm not sure why Travis would fail to run `n stable`. I just tried it locally and it installed v6.6.0 just fine. Can we re-trigger Travis?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-ios pull request #265: CB-11952 - Introduce buildFlag option

Posted by shazron <gi...@git.apache.org>.
Github user shazron commented on a diff in the pull request:

    https://github.com/apache/cordova-ios/pull/265#discussion_r82344533
  
    --- Diff: tests/spec/unit/build.spec.js ---
    @@ -0,0 +1,255 @@
    +/**
    + Licensed to the Apache Software Foundation (ASF) under one
    + or more contributor license agreements.  See the NOTICE file
    + distributed with this work for additional information
    + regarding copyright ownership.  The ASF licenses this file
    + to you under the Apache License, Version 2.0 (the
    + "License"); you may not use this file except in compliance
    + with the License.  You may obtain a copy of the License at
    +
    + http://www.apache.org/licenses/LICENSE-2.0
    +
    + Unless required by applicable law or agreed to in writing,
    + software distributed under the License is distributed on an
    + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + KIND, either express or implied.  See the License for the
    + specific language governing permissions and limitations
    + under the License.
    + */
    +
    +var path = require('path');
    +var rewire = require('rewire');
    +var build = rewire('../../../bin/templates/scripts/cordova/lib/build');
    +
    +describe('build', function () {
    +    var testProjectPath = path.join('/test', 'project', 'path');
    +
    +    describe('getXcodeBuildArgs method', function() {
    +
    +        var getXcodeBuildArgs = build.__get__('getXcodeBuildArgs');
    +        build.__set__('__dirname', path.join('/test', 'dir'));
    +
    +        it('should generate appropriate args if a single buildFlag is passed in', function(done) {
    +            var isDevice = true;
    +            var buildFlags = '-xcconfig TestXcconfigFlag';
    +
    +            var args = getXcodeBuildArgs('TestProjectName', testProjectPath, 'TestConfiguration', isDevice, buildFlags);
    +            expect(args[0]).toEqual('-xcconfig');
    +            expect(args[1]).toEqual('TestXcconfigFlag');
    +            expect(args[2]).toEqual('-project');
    +            expect(args[3]).toEqual('TestProjectName.xcodeproj');
    +            expect(args[4]).toEqual('ARCHS=armv7 arm64');
    +            expect(args[5]).toEqual('-target');
    +            expect(args[6]).toEqual('TestProjectName');
    +            expect(args[7]).toEqual('-configuration');
    +            expect(args[8]).toEqual('TestConfiguration');
    +            expect(args[9]).toEqual('-sdk');
    +            expect(args[10]).toEqual('iphoneos');
    +            expect(args[11]).toEqual('build');
    +            expect(args[12]).toEqual('VALID_ARCHS=armv7 arm64');
    +            expect(args[13]).toEqual('CONFIGURATION_BUILD_DIR=' + path.join(testProjectPath, 'build', 'device'));
    +            expect(args[14]).toEqual('SHARED_PRECOMPS_DIR=' + path.join(testProjectPath, 'build', 'sharedpch'));
    +            expect(args.length).toEqual(15);
    +            done();
    +        });
    --- End diff --
    
    Tests need to be updated once the missing flags are put back.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-ios pull request #265: CB-11952 - Introduce buildFlag option

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-ios/pull/265


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-ios pull request #265: CB-11952 - Introduce buildFlag option

Posted by shazron <gi...@git.apache.org>.
Github user shazron commented on a diff in the pull request:

    https://github.com/apache/cordova-ios/pull/265#discussion_r82344341
  
    --- Diff: bin/templates/scripts/cordova/lib/build.js ---
    @@ -199,33 +220,54 @@ module.exports.findXCodeProjectIn = findXCodeProjectIn;
      * @param  {Boolean} isDevice      Flag that specify target for package (device/emulator)
      * @return {Array}                 Array of arguments that could be passed directly to spawn method
      */
    -function getXcodeBuildArgs(projectName, projectPath, configuration, isDevice) {
    +function getXcodeBuildArgs(projectName, projectPath, configuration, isDevice, buildFlags) {
         var xcodebuildArgs;
    +    var options;
    +    var buildActions = [ 'build' ];
    +    var settings;
    +    var customArgs = {};
    +    customArgs.otherFlags = [];
    +
    +    if (buildFlags) {
    +        if (typeof buildFlags === 'string' || buildFlags instanceof String) {
    +            parseBuildFlag(buildFlags, customArgs);
    +        } else { // buildFlags is an Array of strings
    +            buildFlags.forEach( function(flag) {
    +                parseBuildFlag(flag, customArgs);
    +            });
    +        }
    +    }
    +    
         if (isDevice) {
    -        xcodebuildArgs = [
    -            '-xcconfig', path.join(__dirname, '..', 'build-' + configuration.toLowerCase() + '.xcconfig'),
    -            '-workspace', projectName + '.xcworkspace',
    -            '-scheme', projectName,
    -            '-configuration', configuration,
    -            '-destination', 'generic/platform=iOS',
    -            '-archivePath', projectName + '.xcarchive',
    -            'archive',
    -            'CONFIGURATION_BUILD_DIR=' + path.join(projectPath, 'build', 'device'),
    -            'SHARED_PRECOMPS_DIR=' + path.join(projectPath, 'build', 'sharedpch')
    +        options = [
    +            '-xcconfig', customArgs.xcconfig || path.join(__dirname, '..', 'build-' + configuration.toLowerCase() + '.xcconfig'),
    +            '-project',  customArgs.project || projectName + '.xcodeproj',
    +            customArgs.archs || 'ARCHS=armv7 arm64',
    +            '-target', customArgs.target || projectName,
    +            '-configuration', customArgs.configuration || configuration,
    +            '-sdk', customArgs.sdk || 'iphoneos'
    +        ];
    +        settings = [
    +            customArgs.valid_archs || 'VALID_ARCHS=armv7 arm64',
    +            customArgs.configuration_build_dir || 'CONFIGURATION_BUILD_DIR=' + path.join(projectPath, 'build', 'device'),
    +            customArgs.shared_precomps_dir || 'SHARED_PRECOMPS_DIR=' + path.join(projectPath, 'build', 'sharedpch')
    --- End diff --
    
    A lot of essential flags are missing here.
    - workspace and scheme are essential for Cocoapods support (we don't use the project directly anymore)
    - archiving is essential for moving off the deprecated packaging in xcrun
    - destination is needed as well
    
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-ios issue #265: CB-11952 - Introduce buildFlag option

Posted by adzellman <gi...@git.apache.org>.
Github user adzellman commented on the issue:

    https://github.com/apache/cordova-ios/pull/265
  
    @shazron Review comments addressed. Please re-review.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-ios pull request #265: CB-11952 - Introduce buildFlag option

Posted by shazron <gi...@git.apache.org>.
Github user shazron commented on a diff in the pull request:

    https://github.com/apache/cordova-ios/pull/265#discussion_r82344457
  
    --- Diff: bin/templates/scripts/cordova/lib/build.js ---
    @@ -199,33 +220,54 @@ module.exports.findXCodeProjectIn = findXCodeProjectIn;
      * @param  {Boolean} isDevice      Flag that specify target for package (device/emulator)
      * @return {Array}                 Array of arguments that could be passed directly to spawn method
      */
    -function getXcodeBuildArgs(projectName, projectPath, configuration, isDevice) {
    +function getXcodeBuildArgs(projectName, projectPath, configuration, isDevice, buildFlags) {
         var xcodebuildArgs;
    +    var options;
    +    var buildActions = [ 'build' ];
    +    var settings;
    +    var customArgs = {};
    +    customArgs.otherFlags = [];
    +
    +    if (buildFlags) {
    +        if (typeof buildFlags === 'string' || buildFlags instanceof String) {
    +            parseBuildFlag(buildFlags, customArgs);
    +        } else { // buildFlags is an Array of strings
    +            buildFlags.forEach( function(flag) {
    +                parseBuildFlag(flag, customArgs);
    +            });
    +        }
    +    }
    +    
         if (isDevice) {
    -        xcodebuildArgs = [
    -            '-xcconfig', path.join(__dirname, '..', 'build-' + configuration.toLowerCase() + '.xcconfig'),
    -            '-workspace', projectName + '.xcworkspace',
    -            '-scheme', projectName,
    -            '-configuration', configuration,
    -            '-destination', 'generic/platform=iOS',
    -            '-archivePath', projectName + '.xcarchive',
    -            'archive',
    -            'CONFIGURATION_BUILD_DIR=' + path.join(projectPath, 'build', 'device'),
    -            'SHARED_PRECOMPS_DIR=' + path.join(projectPath, 'build', 'sharedpch')
    +        options = [
    +            '-xcconfig', customArgs.xcconfig || path.join(__dirname, '..', 'build-' + configuration.toLowerCase() + '.xcconfig'),
    +            '-project',  customArgs.project || projectName + '.xcodeproj',
    +            customArgs.archs || 'ARCHS=armv7 arm64',
    +            '-target', customArgs.target || projectName,
    +            '-configuration', customArgs.configuration || configuration,
    +            '-sdk', customArgs.sdk || 'iphoneos'
    +        ];
    +        settings = [
    +            customArgs.valid_archs || 'VALID_ARCHS=armv7 arm64',
    +            customArgs.configuration_build_dir || 'CONFIGURATION_BUILD_DIR=' + path.join(projectPath, 'build', 'device'),
    +            customArgs.shared_precomps_dir || 'SHARED_PRECOMPS_DIR=' + path.join(projectPath, 'build', 'sharedpch')
             ];
         } else { // emulator
    -        xcodebuildArgs = [
    -            '-xcconfig', path.join(__dirname, '..', 'build-' + configuration.toLowerCase() + '.xcconfig'),
    -            '-workspace', projectName + '.xcworkspace',
    -            '-scheme', projectName ,
    -            '-configuration', configuration,
    -            '-sdk', 'iphonesimulator',
    -            '-destination', 'platform=iOS Simulator,name=iPhone 5s',
    -            'build',
    -            'CONFIGURATION_BUILD_DIR=' + path.join(projectPath, 'build', 'emulator'),
    -            'SHARED_PRECOMPS_DIR=' + path.join(projectPath, 'build', 'sharedpch')
    +        options = [
    +            '-xcconfig', customArgs.xcconfig || path.join(__dirname, '..', 'build-' + configuration.toLowerCase() + '.xcconfig'),
    +            '-project', customArgs.project || projectName + '.xcodeproj',
    +            customArgs.archs || 'ARCHS=x86_64 i386',
    +            '-target', customArgs.target || projectName,
    +            '-configuration', customArgs.configuration || configuration,
    +            '-sdk', customArgs.sdk || 'iphonesimulator'
    +        ];
    +        settings = [
    --- End diff --
    
    Same as above. All missing flags are essential.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-ios pull request #265: CB-11952 - Introduce buildFlag option

Posted by shazron <gi...@git.apache.org>.
Github user shazron commented on a diff in the pull request:

    https://github.com/apache/cordova-ios/pull/265#discussion_r82491705
  
    --- Diff: bin/templates/scripts/cordova/lib/build.js ---
    @@ -199,33 +219,52 @@ module.exports.findXCodeProjectIn = findXCodeProjectIn;
      * @param  {Boolean} isDevice      Flag that specify target for package (device/emulator)
      * @return {Array}                 Array of arguments that could be passed directly to spawn method
      */
    -function getXcodeBuildArgs(projectName, projectPath, configuration, isDevice) {
    +function getXcodeBuildArgs(projectName, projectPath, configuration, isDevice, buildFlags) {
         var xcodebuildArgs;
    +    var options;
    +    var buildActions = [ 'build' ];
    +    var settings;
    +    var customArgs = {};
    +    customArgs.otherFlags = [];
    +
    +    if (buildFlags) {
    +        if (typeof buildFlags === 'string' || buildFlags instanceof String) {
    +            parseBuildFlag(buildFlags, customArgs);
    +        } else { // buildFlags is an Array of strings
    +            buildFlags.forEach( function(flag) {
    +                parseBuildFlag(flag, customArgs);
    +            });
    +        }
    +    }
    +    
         if (isDevice) {
    -        xcodebuildArgs = [
    -            '-xcconfig', path.join(__dirname, '..', 'build-' + configuration.toLowerCase() + '.xcconfig'),
    -            '-workspace', projectName + '.xcworkspace',
    -            '-scheme', projectName,
    -            '-configuration', configuration,
    -            '-destination', 'generic/platform=iOS',
    -            '-archivePath', projectName + '.xcarchive',
    -            'archive',
    --- End diff --
    
    The automated tests do run the build command on Travis CI `npm run e2e-tests`
    
    There is no check whether the archive artifact was created though since we can't really build for device on Travis


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-ios pull request #265: CB-11952 - Introduce buildFlag option

Posted by adzellman <gi...@git.apache.org>.
Github user adzellman closed the pull request at:

    https://github.com/apache/cordova-ios/pull/265


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-ios pull request #265: CB-11952 - Introduce buildFlag option

Posted by shazron <gi...@git.apache.org>.
Github user shazron commented on a diff in the pull request:

    https://github.com/apache/cordova-ios/pull/265#discussion_r82490970
  
    --- Diff: bin/templates/scripts/cordova/lib/build.js ---
    @@ -199,33 +219,52 @@ module.exports.findXCodeProjectIn = findXCodeProjectIn;
      * @param  {Boolean} isDevice      Flag that specify target for package (device/emulator)
      * @return {Array}                 Array of arguments that could be passed directly to spawn method
      */
    -function getXcodeBuildArgs(projectName, projectPath, configuration, isDevice) {
    +function getXcodeBuildArgs(projectName, projectPath, configuration, isDevice, buildFlags) {
         var xcodebuildArgs;
    +    var options;
    +    var buildActions = [ 'build' ];
    +    var settings;
    +    var customArgs = {};
    +    customArgs.otherFlags = [];
    +
    +    if (buildFlags) {
    +        if (typeof buildFlags === 'string' || buildFlags instanceof String) {
    +            parseBuildFlag(buildFlags, customArgs);
    +        } else { // buildFlags is an Array of strings
    +            buildFlags.forEach( function(flag) {
    +                parseBuildFlag(flag, customArgs);
    +            });
    +        }
    +    }
    +    
         if (isDevice) {
    -        xcodebuildArgs = [
    -            '-xcconfig', path.join(__dirname, '..', 'build-' + configuration.toLowerCase() + '.xcconfig'),
    -            '-workspace', projectName + '.xcworkspace',
    -            '-scheme', projectName,
    -            '-configuration', configuration,
    -            '-destination', 'generic/platform=iOS',
    -            '-archivePath', projectName + '.xcarchive',
    -            'archive',
    --- End diff --
    
    I think these are missing `-archivePath` and `archive`. See this PR: https://github.com/apache/cordova-ios/pull/257


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-ios issue #265: CB-11952 - Introduce buildFlag option

Posted by codecov-io <gi...@git.apache.org>.
Github user codecov-io commented on the issue:

    https://github.com/apache/cordova-ios/pull/265
  
    ## [Current coverage](https://codecov.io/gh/apache/cordova-ios/pull/265?src=pr) is 59.92% (diff: 97.67%)
    > Merging [#265](https://codecov.io/gh/apache/cordova-ios/pull/265?src=pr) into [master](https://codecov.io/gh/apache/cordova-ios/branch/master?src=pr) will increase coverage by **3.41%**
    
    ```diff
    @@             master       #265   diff @@
    ==========================================
      Files            12         12          
      Lines          1230       1280    +50   
      Methods         198        200     +2   
      Messages          0          0          
      Branches        193        216    +23   
    ==========================================
    + Hits            695        767    +72   
    + Misses          535        513    -22   
      Partials          0          0          
    ```
    
    > Powered by [Codecov](https://codecov.io?src=pr). Last update [636113f...e393738](https://codecov.io/gh/apache/cordova-ios/compare/636113f047ee2c7dae742dff2beafae2121ceb62...e393738fe1f26824555bd090d1e08a725ed75f88?src=pr)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org