Skip to content

Commit 5a95b56

Browse files
committed
--ignore-expo cli option
This option forces ignoring expo projects and treats them as bare-workflow/ejected projects. It helps manually overcome issues when react-native-version falselsy identifies expo presence.
1 parent 699b069 commit 5a95b56

File tree

3 files changed

+7713
-1
lines changed

3 files changed

+7713
-1
lines changed

cli.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ program
4444
"Set a build number. WARNING: Watch out when setting high values. This option follows Android's app versioning specifics - the value has to be an integer and cannot be greater than 2100000000. You cannot decrement this value after publishing to Google Play! More info at: https://developer.android.com/studio/publish/versioning.html#appversioning",
4545
parseInt
4646
)
47+
.option(
48+
"--ignore-expo",
49+
"Treat the app as ejected/bare-workflow even if app.json indicates otherwise."
50+
)
4751
.option(
4852
"--generate-build",
4953
"Generate build number from the package version number. (e.g. build number for version 1.22.3 will be 1022003)"

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ function version(program, projectPath) {
169169

170170
var appJSON;
171171
const appJSONPath = path.join(projPath, "app.json");
172-
const isExpoApp = isExpoProject(projPath);
172+
const isExpoApp = isExpoProject(projPath) && !programOpts.ignoreExpo;
173173

174174
isExpoApp && log({ text: "Expo detected" }, programOpts.quiet);
175175

0 commit comments

Comments
 (0)