-
Notifications
You must be signed in to change notification settings - Fork 49
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
Handle eas build locally thorugh buildCommand in launch.json #833
Handle eas build locally thorugh buildCommand in launch.json #833
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
changes look good, but we also should plan docs updates to explain the changes better in configuration docs.
|
||
type Env = Record<string, string> | undefined; | ||
|
||
const EXPO_LOCAL_BUILD_PATH_REGEX = new RegExp("You can find the build artifacts in (.*)"); |
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.
if we only scan the last line I think we could relax it much more and just take the file paths that are present in the final line of output
Docs update: #897 |
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, left some comments inline
|
||
type TarCommandArgs = { archivePath: string; extractDir: string }; | ||
function tarCommand({ archivePath, extractDir }: TarCommandArgs) { | ||
return exec("tar", ["-xf", archivePath, "-C", extractDir]); |
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.
perhaps would be better to use some existing module like node-tar
this way making this work cross platform and resistant to some PATH related issues
} | ||
|
||
// assuming that the archive contains only one app file | ||
const appName = (await readdir(pathToExtract)).find( |
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.
instead of having this here both here and in runExternalBuild maybe we should just make this metod return a single extracted file and then only make the file extension checks in runExternalBuild
Update docs about `customBuild` command after changes from #833.
Fixes #824
customBuild.buildCommand
assumes the last line of the output is a path to the binary. This PR changes this behavior to look for all paths in the last line of the output; if it does exist, it takes the first path and extracts the tar file if necessary (this is how iOS is bundled). This seems to be a common use case (especially with eas --local) and, currently, we have no other way of handlingeas build
command locally. In the feature, I believe we should extendeas.*
launch config to handlelocal
flag.How Has This Been Tested: