taco-team-build.js
function buildProject(cordovaPlatforms, args, /* optional */ projectPath) {
    if (typeof (cordovaPlatforms) == 'string') {
        cordovaPlatforms = [cordovaPlatforms];
    }

    if (!projectPath) {
        projectPath = defaultConfig.projectPath;
    }

    var appendedVersion = cache.getModuleVersionFromConfig(defaultConfig);
    if (appendedVersion) {
        appendedVersion = '@' + appendedVersion;
    } else {
        appendedVersion = '';
    }

    var cordovaVersion = defaultConfig.moduleVersion;
    return utilities.isCompatibleNpmPackage(defaultConfig.nodePackageName + appendedVersion).then(function (compatibilityResult) {
        switch (compatibilityResult) {
            case utilities.NodeCompatibilityResult.IncompatibleVersion4Ios:
                throw new Error('This Cordova version does not support Node.js 4.0.0 for iOS builds. Either downgrade to an earlier version of Node.js or move to Cordova 5.3.3 or later. See http://go.microsoft.com/fwlink/?LinkID=618471');
            case utilities.NodeCompatibilityResult.IncompatibleVersion5:
                throw new Error('This Cordova version does not support Node.js 5.0.0 or later. Either downgrade to an earlier version of Node.js or move to Cordova 5.4.0 or later. See http://go.microsoft.com/fwlink/?LinkID=618471');
        }

        return utilities.getVersionForNpmPackage(defaultConfig.nodePackageName + appendedVersion);
    }).then(function (version) {
        cordovaVersion = version;
        return setupCordova();
    }).then(function (cordova) {
        return applyExecutionBitFix(cordovaPlatforms).then(function () {
            return Q(cordova);
        }, function (err) {
                return Q(cordova);
            });
    }).then(function (cordova) {
        return addSupportPluginIfRequested(cordova, defaultConfig);
    }).then(function (cordova) {
        // Add platforms if not done already
        var promise = _addPlatformsToProject(cordovaPlatforms, projectPath, cordova);
        //Build each platform with args in args object
        cordovaPlatforms.forEach(function (platform) {
            promise = promise.then(function () {
                // Build app with platform specific args if specified
                var callArgs = utilities.getCallArgs(platform, args, cordovaVersion);
                return ensureProjectXcode8Compatibility(projectPath, platform, callArgs);
            }).then(function() {
                var callArgs = utilities.getCallArgs(platform, args, cordovaVersion);
                var argsString = _getArgsString(callArgs.options);
                console.log('Queueing build for platform ' + platform + ' w/options: ' + argsString);
                return cordova.raw.build(callArgs);
            });
        });

        return promise;
    });
}
function buildProject(cordovaPlatforms, args, /* optional */ projectPath) {
    if (typeof (cordovaPlatforms) == 'string') {
        cordovaPlatforms = [cordovaPlatforms];
    }

    if (!projectPath) {
        projectPath = defaultConfig.projectPath;
    }

    var appendedVersion = cache.getModuleVersionFromConfig(defaultConfig);
    if (appendedVersion) {
        appendedVersion = '@' + appendedVersion;
    } else {
        appendedVersion = '';
    }

    var cordovaVersion = defaultConfig.moduleVersion;
    return utilities.isCompatibleNpmPackage(defaultConfig.nodePackageName + appendedVersion).then(function (compatibilityResult) {
        switch (compatibilityResult) {
            case utilities.NodeCompatibilityResult.IncompatibleVersion4Ios:
                throw new Error('This Cordova version does not support Node.js 4.0.0 for iOS builds. Either downgrade to an earlier version of Node.js or move to Cordova 5.3.3 or later. See http://go.microsoft.com/fwlink/?LinkID=618471');
            case utilities.NodeCompatibilityResult.IncompatibleVersion5:
                throw new Error('This Cordova version does not support Node.js 5.0.0 or later. Either downgrade to an earlier version of Node.js or move to Cordova 5.4.0 or later. See http://go.microsoft.com/fwlink/?LinkID=618471');
        }

        return utilities.getVersionForNpmPackage(defaultConfig.nodePackageName + appendedVersion);
    }).then(function (version) {
        cordovaVersion = version;
        return setupCordova();
    }).then(function (cordova) {
        return applyExecutionBitFix(cordovaPlatforms).then(function () {
            return Q(cordova);
        }, function (err) {
                return Q(cordova);
            });
    }).then(function (cordova) {
        return addSupportPluginIfRequested(cordova, defaultConfig);
    }).then(function (cordova) {
        // Add platforms if not done already
        var promise = _addPlatformsToProject(cordovaPlatforms, projectPath, cordova);
        //Build each platform with args in args object
        cordovaPlatforms.forEach(function (platform) {
            promise = promise.then(function () {
                // Build app with platform specific args if specified
                var callArgs = utilities.getCallArgs(platform, args, cordovaVersion);
                return ensureProjectXcode8Compatibility(projectPath, platform, callArgs);
            }).then(function() {
                var callArgs = utilities.getCallArgs(platform, args, cordovaVersion);
                var argsString = _getArgsString(callArgs.options);
                console.log('Queueing build for platform ' + platform + ' w/options: ' + argsString);
                return cordova.raw.build(callArgs);
            });
        });

        return promise;
    });
}
function buildProject ( cordovaPlatforms , args , /* optional */ projectPath ) { if ( typeof ( cordovaPlatforms ) == 'string' ) { cordovaPlatforms = [ cordovaPlatforms ] ; } if ( ! projectPath ) { projectPath = defaultConfig . projectPath ; } var appendedVersion = cache . getModuleVersionFromConfig ( defaultConfig ) ; if ( appendedVersion ) { appendedVersion = '@' + appendedVersion ; } else { appendedVersion = '' ; } var cordovaVersion = defaultConfig . moduleVersion ; return utilities . isCompatibleNpmPackage ( defaultConfig . nodePackageName + appendedVersion ) . then ( function ( compatibilityResult ) { switch ( compatibilityResult ) { case utilities . NodeCompatibilityResult . IncompatibleVersion4Ios : throw new Error ( 'This Cordova version does not support Node.js 4.0.0 for iOS builds. Either downgrade to an earlier version of Node.js or move to Cordova 5.3.3 or later. See http://go.microsoft.com/fwlink/?LinkID=618471' ) ; case utilities . NodeCompatibilityResult . IncompatibleVersion5 : throw new Error ( 'This Cordova version does not support Node.js 5.0.0 or later. Either downgrade to an earlier version of Node.js or move to Cordova 5.4.0 or later. See http://go.microsoft.com/fwlink/?LinkID=618471' ) ; } return utilities . getVersionForNpmPackage ( defaultConfig . nodePackageName + appendedVersion ) ; } ) . then ( function ( version ) { cordovaVersion = version ; return setupCordova ( ) ; } ) . then ( function ( cordova ) { return applyExecutionBitFix ( cordovaPlatforms ) . then ( function ( ) { return Q ( cordova ) ; } , function ( err ) { return Q ( cordova ) ; } ) ; } ) . then ( function ( cordova ) { return addSupportPluginIfRequested ( cordova , defaultConfig ) ; } ) . then ( function ( cordova ) { // Add platforms if not done already var promise = _addPlatformsToProject ( cordovaPlatforms , projectPath , cordova ) ; //Build each platform with args in args object cordovaPlatforms . forEach ( function ( platform ) { promise = promise . then ( function ( ) { // Build app with platform specific args if specified var callArgs = utilities . getCallArgs ( platform , args , cordovaVersion ) ; return ensureProjectXcode8Compatibility ( projectPath , platform , callArgs ) ; } ) . then ( function ( ) { var callArgs = utilities . getCallArgs ( platform , args , cordovaVersion ) ; var argsString = _getArgsString ( callArgs . options ) ; console . log ( 'Queueing build for platform ' + platform + ' w/options: ' + argsString ) ; return cordova . raw . build ( callArgs ) ; } ) ; } ) ; return promise ; } ) ; }
Main build method
Main build method