Skip to content

Commit

Permalink
chore: Merge pull request #9 from eventOneHQ/master
Browse files Browse the repository at this point in the history
1.2
  • Loading branch information
nprail authored Oct 5, 2019
2 parents 22f47e4 + 2f70db7 commit d2c2fe7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const argv = yargs
})
.option('apk', {
alias: 'a',
describe: 'Path to the APK file'
describe: 'Path to the APK file',
type: 'array'
})
.config(
'key',
Expand Down
7 changes: 5 additions & 2 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ export interface IPackageManifest {
* Parse the manifest of an APK file
* @param apk Path to the APK file
*/
export const parseManifest = async (apk: string): Promise<IPackageManifest> => {
export const parseManifest = async (
apk: string | string[]
): Promise<IPackageManifest> => {
debug('> Parsing manifest')
const reader = await ApkReader.open(apk)
const apkFile = typeof apk !== 'string' ? apk[0] : apk
const reader = await ApkReader.open(apkFile)
const manifest = await reader.readManifest()

debug(`> Detected package name ${manifest.package}`)
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class Apkup {
* ```
*/
public async upload (
apk: string,
apk: string | string[],
uploadParams?: IUploadParams
): Promise<IEditResponse> {
const apkPackage = await parseManifest(apk)
Expand Down Expand Up @@ -108,7 +108,7 @@ export class Apkup {
*/
public async promote (
promoteParams: IPromoteParams,
apk?: string,
apk?: string | string[],
editParams?: IEditParams
) {
let edit: IEditParams
Expand Down

0 comments on commit d2c2fe7

Please sign in to comment.