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