-
Notifications
You must be signed in to change notification settings - Fork 477
[upload] Added support for tar.gz files #2504
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm requesting changes mostly because of the addition of a new package for uncompressing tar archives. We already have targz
installed so we should either use it or refactor Expo CLI to use the new one and remove the old one.
Also, heads up that this code is a legacy. We already refactored/reimplemented Android uploads so they use Submission Service. The code lives in |
Didn't take too long to implement this and I think it'll end up being valuable since I'm sure people will attempt to use it with EAS (I already did). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Please update the changelog!
async function createTemporaryDirectoryForExtractionAsync(): Promise<string> { | ||
// Since we may need to rename the destination path, | ||
// add everything to a folder which can be nuked to ensure we don't accidentally use an old build with the same name. | ||
const destinationFolder = join(os.tmpdir(), 'expo-submission-service'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EvanBacon with this change, only one single process can upload one build artefact at a time, since otherwise the file will be deleted from under that process. E.g. trying to run expo upload:ios
and expo upload:android
in parallel will have one of them fail with either:
Error setting value '/tmp/expo-submission-service/foo-xxxxxx-signed.aab' for option 'aab'
Could not find aab file at path '/tmp/expo-submission-service/foo-xxxxxx-signed.aab'
or:
Failed to upload the standalone app to the app store.
Could not find file at path '/tmp/expo-submission-service/foo-xxxxxx-archive.ipa'
We have build scripts that submits several builds at the same time, and this is currently breaking our workflow. Would it be possible to use a new folder each time, instead of always using expo-submission-service
?
I'll send a pull request with that change, but I'm also happy to consider any other approach to solve this 👍
Why
expo upload:ios --url <artifact>
doesn't work. Likewiseexpo upload:ios --path </Downloads/artifact>
can also be easy to mess up.Failed to upload the standalone app to the app store. Zip end of central directory signature not found
is part of Fastlane we can't throw a more useful error in an elegant fashion.How
tar.gz
- this is pretty fragile.Test Plan
expo upload:ios --path /path/to/eas-output.tar.gz
expo upload:ios --url http://128.0.0.1:3000/app.tar.gz
expo upload:ios --path /path/to/app.ipa
expo upload:ios --path http://128.0.0.1:3000/app.ipa