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

Add parse ipa and apk

This commit is contained in:
sunnylqm
2020-08-12 15:28:07 +08:00
parent f0ad8bdcde
commit 27ed4bd8d1
2 changed files with 28 additions and 19 deletions

View File

@@ -2,15 +2,11 @@
"useCommand": true,
"defaultCommand": "help",
"commands": {
"help": {
},
"help": {},
"login":{
},
"logout": {
},
"me": {
},
"login": {},
"logout": {},
"me": {},
"createApp": {
"options": {
@@ -29,8 +25,7 @@
}
}
},
"deleteApp": {
},
"deleteApp": {},
"selectApp": {
"options": {
"platform": {
@@ -39,10 +34,10 @@
}
},
"uploadIpa": {
},
"uploadApk": {
},
"uploadIpa": {},
"uploadApk": {},
"parseIpa": {},
"parseApk": {},
"packages": {
"options": {
"platform": {
@@ -118,9 +113,7 @@
"default": "build/output/${platform}.${time}.ppk",
"hasValue": true
},
"verbose": {
}
"verbose": {}
}
},
"release": {

View File

@@ -81,6 +81,22 @@ export const commands = {
saveToLocal(fn, `${appId}/package/${id}.apk`);
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 }) {
const platform = checkPlatform(options.platform || (await question('Platform(ios/android):')));
const { appId } = await getSelectedApp(platform);