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,
|
||||
"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": {
|
||||
@@ -102,7 +97,7 @@
|
||||
"platform": {
|
||||
"hasValue": true
|
||||
},
|
||||
"bundleName":{
|
||||
"bundleName": {
|
||||
"default": "index.bundlejs",
|
||||
"hasValue": true
|
||||
},
|
||||
@@ -118,9 +113,7 @@
|
||||
"default": "build/output/${platform}.${time}.ppk",
|
||||
"hasValue": true
|
||||
},
|
||||
"verbose": {
|
||||
|
||||
}
|
||||
"verbose": {}
|
||||
}
|
||||
},
|
||||
"release": {
|
||||
@@ -154,7 +147,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"globalOptions":{
|
||||
"globalOptions": {
|
||||
"no-interactive": {
|
||||
"default": false
|
||||
}
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user