Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENG-509][submit] Fix local archive prompt #273

Merged
merged 1 commit into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ This is the log of notable changes to EAS CLI and related packages.

### 🐛 Bug fixes

- Fix `eas submit` local archive prompt for `.aab` files when submitting for iOS. ([#273](https://github.com/expo/eas-cli/pull/144) by [@barthap](https://github.com/barthap))

### 🧹 Chores

## [0.6.0](https://github.com/expo/eas-cli/releases/tag/v0.6.0) - 2021-03-09
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ async function handlePromptSourceAsync(source: ArchiveFilePromptSource): Promise
});
}
case ArchiveFileSourceType.path: {
const path = await askForArchivePathAsync();
const path = await askForArchivePathAsync(source.platform);
return getArchiveFileLocationAsync({
...source,
sourceType: ArchiveFileSourceType.path,
Expand Down Expand Up @@ -258,11 +258,12 @@ async function askForArchiveUrlAsync(): Promise<string> {
return url;
}

async function askForArchivePathAsync(): Promise<string> {
const defaultArchivePath = '/path/to/your/archive.aab';
async function askForArchivePathAsync(platform: SubmissionPlatform): Promise<string> {
const isIos = platform === SubmissionPlatform.iOS;
const defaultArchivePath = `/path/to/your/archive.${isIos ? 'ipa' : 'aab'}`;
const { path } = await promptAsync({
name: 'path',
message: 'Path to the app archive file (aab or apk):',
message: `Path to the app archive file (${isIos ? 'ipa' : 'aab or apk'}):`,
initial: defaultArchivePath,
type: 'text',
validate: async (path: string): Promise<boolean | string> => {
Expand Down