1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-10-09 01:25:14 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

pushy uploadIpa

This commit is contained in:
tdzl2003
2016-04-02 23:39:09 +08:00
parent ae628b310a
commit d0037f1217
8 changed files with 218 additions and 32 deletions

31
local-cli/src/package.js Normal file
View File

@@ -0,0 +1,31 @@
/**
* Created by tdzl2003 on 4/2/16.
*/
const {
get,
post,
uploadFile,
} = require('./api');
import { checkPlatform, getSelectedApp } from './app';
import {getIPAVersion, getApkVersion} from './utils';
export const commands = {
uploadIpa: async function({args}) {
const fn = args[0];
if (!fn) {
throw new Error('Usage: pushy uploadIpa <ipaFile>');
}
const name = await getIPAVersion(fn);
const {appId} = await getSelectedApp('ios');
const {hash} = await uploadFile(fn);
await post(`/app/${appId}/package/create`, {
name,
hash,
});
}
};