const deployIOS = require('./deploy-ios')
const deployAndroid = require('./deploy-android')
const { isMacOS, isWindows } = require('../../utils/platform')
async function deploy (options) {
    const platform = options.platform
    switch (platform && platform.toLowerCase()) {
        case 'ios':
            await deployIOS(options)
            break
        case 'android':
            await deployAndroid(options)
            break
        case 'all':
            if (isMacOS()) {
                await deployIOS(options)
            }
            await deployAndroid(options)
            break
        default:
            console.fatal('Invalid platform: ' + platform)
    }
}

module.exports = { deploy }
