Is it possible to disable to "would you like to build anyway" prompt when building?


#1

I’m using bitbucket pipeline and it keeps failing because some input is required for the following:

There were no new changes from the last build, you can download that build from here: https://.......
[22:54:39] Input is required, but expo is in non-interactive mode.`
Required input:

> Do you want to build app anyway?

Can this be disabled?

Also, what determines a “change”? My code has changed so not sure why this even shows up. Does it use the version number?


#2

Hi

Build command should only be used after native code is changed(new sdk, bug fixes on our side, changes in app.json). Normally you need only to use publish to deploy new changes (https://docs.expo.io/versions/latest/workflow/publishing/). This prompt was added because a lot of projects were rebuilding apk for every deploy. Currently, there is no flag that could disable this prompt, it will show up if the last build had the same manifest and was build with the same turtle version.


#3

Ok thanks, so what is the best way for me to generate an APK after my react native code has been updated? I download this APK to install on my device for testing.


#4

If you’re just pushing out JS changes, you don’t need to rebuild a new APK as long as it’s running the same release channel (if you’re using them). The changes will get pushed over-the-air and you can test them with the same APK you have installed already.


#5

Ah ok that’s great thanks! Is there a separate command for over the air updates?


#6

Yep! expo publish

Options:

-q, --quiet                          Suppress verbose output from the React Native packager.
-s, --send-to [dest]                 A phone number or e-mail address to send a link to
-c, --clear                          Clear the React Native packager cache
--max-workers [num]                  Maximum number of tasks to allow Metro to spawn.
--release-channel <release channel>  The release channel to publish to. Default is 'default'. (default: default)
--config [file]                      Specify a path to app.json
-h, --help                           output usage information

#7

Fantastic thanks!


#8

Just wondering, in what real world scenario would you use this? Can you use this for bug fixes for example? If I change the minor version from 1.0.0 to 1.0.1 can I still use it or does that require a full build?


#9

Is this only applicable when publishing to the app store? I haven’t submitted my app to the store yet so I’m just building and downloading the APK from the Expo site. If I use “expo publish” will that update the APK on the expo site?


#10

Such real world use cases would include things like fixing a minor bug, changing the style of a component, fixing a spelling error in some text, etc. When you publish, it will update the bundle stored on the CDN so if you run the publish project in the Expo client, it will fetch the latest updates as well.


#11

Brilliant thank you for all the explanations! One more question, does the published project in the Expo client run the exact same as a fully fledged APK version would? For example for Google Login, would the expo web version be used or the system’s version?


#12

Unless you explicitly disable OTA updates every application will fetch latest published version of js code for this channel.

Build command is calling publish internally, so you need to remember that if you have published app in store and you call expo build you app will be updated on user’s phones regardless whether you uploaded it to store or not. There is flag --no-publish that would block this, but then final app won’t have your current js changes.


#13

Great thanks for that. Does the published project in the Expo client run the exact same as a fully fledged APK version would? For example for Google Login, would the expo web version be used or the system’s version?


#14

There is no such thing as “fully fledged APK version”, it’s always the latest published version regardless whether you use build or publish, the only difference is that when you build and upload to the store latest published javascript bundle will be packaged inside apk. Under ideal conditions, you would only need to build an application once per release channel.

So to answer your question, it will always use the newest “web” version, unless the user installed app and disabled internet connection.


#15

Great thank you.