mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-09-16 09:41:38 +08:00
Add parse ipa and apk
This commit is contained in:
31
cli.json
31
cli.json
@@ -2,15 +2,11 @@
|
|||||||
"useCommand": true,
|
"useCommand": true,
|
||||||
"defaultCommand": "help",
|
"defaultCommand": "help",
|
||||||
"commands": {
|
"commands": {
|
||||||
"help": {
|
"help": {},
|
||||||
},
|
|
||||||
|
|
||||||
"login":{
|
"login": {},
|
||||||
},
|
"logout": {},
|
||||||
"logout": {
|
"me": {},
|
||||||
},
|
|
||||||
"me": {
|
|
||||||
},
|
|
||||||
|
|
||||||
"createApp": {
|
"createApp": {
|
||||||
"options": {
|
"options": {
|
||||||
@@ -29,8 +25,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"deleteApp": {
|
"deleteApp": {},
|
||||||
},
|
|
||||||
"selectApp": {
|
"selectApp": {
|
||||||
"options": {
|
"options": {
|
||||||
"platform": {
|
"platform": {
|
||||||
@@ -39,10 +34,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"uploadIpa": {
|
"uploadIpa": {},
|
||||||
},
|
"uploadApk": {},
|
||||||
"uploadApk": {
|
"parseIpa": {},
|
||||||
},
|
"parseApk": {},
|
||||||
"packages": {
|
"packages": {
|
||||||
"options": {
|
"options": {
|
||||||
"platform": {
|
"platform": {
|
||||||
@@ -102,7 +97,7 @@
|
|||||||
"platform": {
|
"platform": {
|
||||||
"hasValue": true
|
"hasValue": true
|
||||||
},
|
},
|
||||||
"bundleName":{
|
"bundleName": {
|
||||||
"default": "index.bundlejs",
|
"default": "index.bundlejs",
|
||||||
"hasValue": true
|
"hasValue": true
|
||||||
},
|
},
|
||||||
@@ -118,9 +113,7 @@
|
|||||||
"default": "build/output/${platform}.${time}.ppk",
|
"default": "build/output/${platform}.${time}.ppk",
|
||||||
"hasValue": true
|
"hasValue": true
|
||||||
},
|
},
|
||||||
"verbose": {
|
"verbose": {}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"release": {
|
"release": {
|
||||||
@@ -154,7 +147,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"globalOptions":{
|
"globalOptions": {
|
||||||
"no-interactive": {
|
"no-interactive": {
|
||||||
"default": false
|
"default": false
|
||||||
}
|
}
|
||||||
|
@@ -81,6 +81,22 @@ export const commands = {
|
|||||||
saveToLocal(fn, `${appId}/package/${id}.apk`);
|
saveToLocal(fn, `${appId}/package/${id}.apk`);
|
||||||
console.log(`Apk uploaded: ${id}`);
|
console.log(`Apk uploaded: ${id}`);
|
||||||
},
|
},
|
||||||
|
parseIpa: async function({ args }) {
|
||||||
|
const fn = args[0];
|
||||||
|
if (!fn || !fn.endsWith('.ipa')) {
|
||||||
|
throw new Error('Usage: pushy parseIpa <ipaFile>');
|
||||||
|
}
|
||||||
|
const { versionName, buildTime } = await getIpaInfo(fn);
|
||||||
|
console.log(`版本号: ${versionName}, 编译时间戳: ${buildTime}`);
|
||||||
|
},
|
||||||
|
parseApk: async function({ args }) {
|
||||||
|
const fn = args[0];
|
||||||
|
if (!fn || !fn.endsWith('.apk')) {
|
||||||
|
throw new Error('Usage: pushy parseApk <apkFile>');
|
||||||
|
}
|
||||||
|
const { versionName, buildTime } = await getApkInfo(fn);
|
||||||
|
console.log(`版本号: ${versionName}, 编译时间戳: ${buildTime}`);
|
||||||
|
},
|
||||||
packages: async function({ options }) {
|
packages: async function({ options }) {
|
||||||
const platform = checkPlatform(options.platform || (await question('Platform(ios/android):')));
|
const platform = checkPlatform(options.platform || (await question('Platform(ios/android):')));
|
||||||
const { appId } = await getSelectedApp(platform);
|
const { appId } = await getSelectedApp(platform);
|
||||||
|
Reference in New Issue
Block a user