Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
[cli] Mark expo upload:ios as unsupported (#3030)
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanBacon authored Dec 27, 2020
1 parent c90ca96 commit 5be54c6
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 447 deletions.
55 changes: 18 additions & 37 deletions packages/expo-cli/src/commands/upload.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import chalk from 'chalk';
import { Command } from 'commander';
import pick from 'lodash/pick';

import CommandError from '../CommandError';
import log from '../log';
import IOSUploader, { IosPlatformOptions, LANGUAGES } from './upload/IOSUploader';
import AndroidSubmitCommand from './upload/submission-service/android/AndroidSubmitCommand';
import { AndroidSubmitCommandOptions } from './upload/submission-service/android/types';
import * as TerminalLink from './utils/TerminalLink';

const SOURCE_OPTIONS = ['id', 'latest', 'path', 'url'];

export default function (program: Command) {
program
.command('upload:android [path]')
Expand Down Expand Up @@ -59,7 +54,9 @@ export default function (program: Command) {
program
.command('upload:ios [path]')
.alias('ui')
.description('macOS only: Upload an iOS binary to Apple. An alternative to Transporter.app')
.description(
`${chalk.yellow('Unsupported:')} Use ${chalk.bold('eas submit')} or Transporter app instead.`
)
.longDescription(
'Upload an iOS binary to Apple TestFlight (MacOS only). Uses the latest build by default'
)
Expand Down Expand Up @@ -101,38 +98,22 @@ export default function (program: Command) {
'English'
)
.option('--public-url <url>', 'The URL of an externally hosted manifest (for self-hosted apps)')

.on('--help', function () {
log('Available languages:');
log(` ${LANGUAGES.join(', ')}`);
log();
})
// TODO: make this work outside the project directory (if someone passes all necessary options for upload)
.asyncActionProjectDir(async (projectDir: string, options: IosPlatformOptions) => {
try {
// TODO: remove this once we remove fastlane
if (process.platform !== 'darwin') {
throw new CommandError('Currently, iOS uploads are only supported on macOS, sorry :(');
}
.asyncActionProjectDir(async (projectDir: string, options: any) => {
const logItem = (name: string, link: string) => {
log(`\u203A ${TerminalLink.linkedText(name, link)}`);
};

const args = pick(options, SOURCE_OPTIONS);
if (Object.keys(args).length > 1) {
throw new Error(`You have to choose only one of: --path, --id, --latest, --url`);
}
IOSUploader.validateOptions(options);
const uploader = new IOSUploader(projectDir, options);
await uploader.upload();
} catch (err) {
log.error('Failed to upload the standalone app to the App Store.');
log.warn(
`We recommend using ${chalk.bold(
TerminalLink.transporterAppLink()
)} instead of the ${chalk.bold(
'expo upload:ios'
)} command if you have any trouble with it.`
);

throw err;
}
log.newLine();
log(chalk.yellow('expo upload:ios is no longer supported'));
log('Please use one of the following');
log.newLine();
logItem(chalk.cyan.bold('eas submit'), 'https://docs.expo.io/submit/ios');
logItem('Transporter', 'https://apps.apple.com/us/app/transporter/id1450874784');
logItem(
'Fastlane deliver',
'https://docs.fastlane.tools/getting-started/ios/appstore-deployment'
);
log.newLine();
});
}
140 changes: 0 additions & 140 deletions packages/expo-cli/src/commands/upload/BaseUploader.ts

This file was deleted.

Loading

0 comments on commit 5be54c6

Please sign in to comment.