mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-11-02 07:43:10 +08:00
fix gradle check
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-update-cli",
|
||||
"version": "1.30.4",
|
||||
"version": "1.31.0",
|
||||
"description": "Command tools for javaScript updater with `pushy` service for react native apps.",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
|
||||
@@ -177,7 +177,9 @@ async function checkGradleConfig() {
|
||||
let crunchPngs;
|
||||
try {
|
||||
const gradleConfig = await g2js.parseFile('android/app/build.gradle');
|
||||
crunchPngs = gradleConfig.android.buildTypes.release.crunchPngs;
|
||||
const projectConfig = gradleConfig['project.ext.react'];
|
||||
if (projectConfig) {
|
||||
for (const packagerConfig of projectConfig) {
|
||||
if (
|
||||
packagerConfig.includes('enableHermes') &&
|
||||
@@ -187,7 +189,7 @@ async function checkGradleConfig() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
crunchPngs = gradleConfig.android.buildTypes.release.crunchPngs;
|
||||
}
|
||||
} catch (e) {}
|
||||
return {
|
||||
enableHermes,
|
||||
@@ -609,7 +611,6 @@ export const commands = {
|
||||
const { version, major, minor } = getRNVersion();
|
||||
|
||||
console.log('Bundling with react-native: ', version);
|
||||
printVersionCommand();
|
||||
|
||||
await runReactNativeBundleCommand(
|
||||
bundleName,
|
||||
|
||||
@@ -134,7 +134,9 @@ export const commands = {
|
||||
let minPkgVersion = options.minPackageVersion;
|
||||
let maxPkgVersion = options.maxPackageVersion;
|
||||
let rollout = options.rollout;
|
||||
if (rollout !== undefined) {
|
||||
if (rollout === undefined) {
|
||||
rollout = null;
|
||||
} else {
|
||||
try {
|
||||
rollout = parseInt(rollout);
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user