All files / src/deployTools fastlane.js

41.38% Statements 12/29
0% Branches 0/6
0% Functions 0/2
46.67% Lines 7/15

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 362x   2x 2x 2x 2x   2x                                             2x          
import { executeAsync } from '../systemTools/exec';
import { commandExistsSync } from '../systemTools/exec';
import { inquirerPrompt } from '../systemTools/prompt';
import { getAppFolder } from '../common';
import Config from '../config';
import PlatformSetup from '../setupTools';
 
const rnvFastlane = async () => {
    const args = Config.rnvArguments;
    args.shift(); // we know the first one is fastlane, trash it
 
    if (!commandExistsSync('fastlane')) {
        const setupInstance = PlatformSetup();
        await setupInstance.askToInstallSDK('fastlane');
    }
 
    const c = Config.getConfig();
 
    // shell: true,
    // stdio: 'inherit',
    // silent: true,
 
    const appFolder = getAppFolder(c, c.platform);
 
    let fastlaneArgs = [...c.program.rawArgs];
    fastlaneArgs = fastlaneArgs.slice(3);
 
    return executeAsync(c, `fastlane ${fastlaneArgs.join(' ')}`, {
        interactive: true,
        env: process.env,
        cwd: appFolder
    });
};
 
export { rnvFastlane };