cli: --app-url and .tar.gz apps for Expo / EAS builds (TB-379) - #40
Merged
Conversation
eas build hands back a download URL, and for iOS simulator builds the artifact is a .tar.gz with the .app inside. The CLI now accepts: - --app-url <http(s) url>: downloads .apk/.ipa/.zip/.tar.gz to a temp dir (extension from the URL path, Content-Disposition or Content-Type), with a clear message for expired signed links (401/403). - .tar.gz as an app format, local or downloaded: extracted with the system tar and the shallowest .app bundle is used. - testingbot upload <url>. - Inside EAS Build, the build id/profile/platform are attached as metadata and EAS_BUILD_GIT_COMMIT_HASH is the default commit SHA. Temp files are removed after the upload, including on failure. Only one app source may be given (file, --app-url or --app-binary-id).
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes Expo / EAS Build artifacts a first-class input, and URL downloads in general.
--app-url <url>downloads the app instead of reading a local file. All formats are supported:.apk,.apks,.ipa,.zipand.tar.gz. The extension comes from the URL path, thenContent-Disposition, thenContent-Type. A 401/403 is reported as an expired signed link (EAS URLs expire after about an hour); 404 and other failures get their own messages. Every positional argument is then a flow..tar.gzas an app format, local or downloaded: extracted with the systemtar(present on macOS, Linux and Windows runners), the shallowest.appbundle inside is used (root orPayload/), then zipped and uploaded via the existing.apppath. A clear error when the archive holds no.app(device build instead of simulator build).testingbot upload <url>accepts URLs too.EAS_BUILD_GIT_COMMIT_HASHis the default--commit-sha.--app-urlor--app-binary-id. Temp directories are removed after the upload, including on failure. Dry-run shows the URL without downloading.Jira: TB-379 (epic TB-370).
Test plan
npm test— 753 passed (25 new: URL/extension helpers, download with header fallbacks and error mapping, real tar extraction incl. nestedPayload/and corrupt archives, provider materialize/cleanup/exclusivity, CLI flag wiring and EAS metadata)npm run lint,npm run buildupload https://testingbot.com/appium/sample.apk→ downloaded 25.8 MB, checksum-deduped, project 92948upload sample-sim.tar.gz(built from the public iOS sample) →SampleApp.appextracted, zipped, uploaded, project 92951--app-url …tar.gzshows the URL and skips the download