# All files / src/deployTools fastlane.js

40% Statements 12/30
0% Branches 0/6
0% Functions 0/2
43.75% Lines 7/16

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
    36
    372x

    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')) {
            console.log('!exist');
            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 };