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

Support oss

This commit is contained in:
sunnylqm
2020-03-06 18:56:15 +08:00
parent 76d958c623
commit 0b217484b7
7 changed files with 302 additions and 1174 deletions

View File

@@ -47,7 +47,7 @@ export async function choosePackage(appId) {
export const commands = {
uploadIpa: async function({ args }) {
const fn = args[0];
if (!fn) {
if (!fn || !fn.endsWith('.ipa')) {
throw new Error('Usage: pushy uploadIpa <ipaFile>');
}
const { versionName, buildTime } = await getIpaInfo(fn);
@@ -60,12 +60,12 @@ export const commands = {
hash,
buildTime,
});
saveToLocal(fn, `${appId}/${id}.ipa`);
saveToLocal(fn, `${appId}/package/${id}.ipa`);
console.log(`Ipa uploaded: ${id}`);
},
uploadApk: async function({ args }) {
const fn = args[0];
if (!fn) {
if (!fn || !fn.endsWith('.apk')) {
throw new Error('Usage: pushy uploadApk <apkFile>');
}
const { versionName, buildTime } = await getApkInfo(fn);
@@ -78,7 +78,7 @@ export const commands = {
hash,
buildTime,
});
saveToLocal(fn, `${appId}/${id}.apk`);
saveToLocal(fn, `${appId}/package/${id}.apk`);
console.log(`Apk uploaded: ${id}`);
},
packages: async function({ options }) {