mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-10-09 01:25:14 +08:00
pushy uploadIpa
This commit is contained in:
31
local-cli/src/package.js
Normal file
31
local-cli/src/package.js
Normal 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,
|
||||
});
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user