1
0
mirror of https://gitcode.com/github-mirrors/react-native-update-cli.git synced 2025-09-16 09:41:38 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Compare commits

...

2 Commits

Author SHA1 Message Date
sunnylqm
6cb38eeec1 v1.1.17 2020-10-13 18:12:35 +08:00
sunnylqm
8a7c21fb50 Do not throw update.json not found error 2020-10-13 18:12:15 +08:00
2 changed files with 7 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "react-native-update-cli",
"version": "1.1.16",
"version": "1.1.17",
"description": "Command tools for javaScript updater with `pushy` service for react native apps.",
"main": "index.js",
"bin": {

View File

@@ -68,10 +68,10 @@ export async function getApkInfo(fn) {
const updateJsonFile = await appInfoParser.parser.getEntry(
/res\/raw\/update.json/,
);
if (!updateJsonFile) {
throw new Error('找不到update.json文件');
let appCredential = {};
if (updateJsonFile) {
appCredential = JSON.parse(updateJsonFile.toString()).android;
}
const appCredential = JSON.parse(updateJsonFile.toString()).android;
const { versionName, application } = await appInfoParser.parse();
let buildTime = 0;
if (Array.isArray(application.metaData)) {
@@ -102,10 +102,10 @@ export async function getIpaInfo(fn) {
const updateJsonFile = await appInfoParser.parser.getEntry(
/payload\/.+?\.app\/assets\/update.json/,
);
if (!updateJsonFile) {
throw new Error('找不到update.json文件');
let appCredential = {};
if (updateJsonFile) {
appCredential = JSON.parse(updateJsonFile.toString()).ios;
}
const appCredential = JSON.parse(updateJsonFile.toString()).ios;
const {
CFBundleShortVersionString: versionName,
} = await appInfoParser.parse();