Skip to content

Commit 752b924

Browse files
authored
[MOB-11997] Replace CLI dir flag with file (#937)
1 parent 102ddc3 commit 752b924

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

cli/UploadSourcemaps.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ import axios from 'axios';
22
import { Command, Option } from 'commander';
33
import FormData from 'form-data';
44
import fs from 'fs';
5-
import path from 'path';
65

76
interface UploadSourcemapsOptions {
87
platform: 'android' | 'ios';
9-
dir: string;
8+
file: string;
109
token: string;
1110
name: string;
1211
code: string;
@@ -23,10 +22,7 @@ uploadSourcemapsCommand
2322
.makeOptionMandatory(),
2423
)
2524
.addOption(
26-
new Option(
27-
'-d, --dir <value>',
28-
'The path of the directory including the source map file',
29-
).makeOptionMandatory(),
25+
new Option('-f, --file <path>', 'The path of the source map file').makeOptionMandatory(),
3026
)
3127
.addOption(
3228
new Option('-t, --token <value>', 'Your App Token')
@@ -56,8 +52,7 @@ uploadSourcemapsCommand
5652

5753
const uploadSourcemaps = async (opts: UploadSourcemapsOptions) => {
5854
const fileName = `${opts.platform}-sourcemap.json`;
59-
const filePath = path.join(opts.dir, fileName);
60-
const fileBlob = fs.readFileSync(filePath);
55+
const fileBlob = fs.readFileSync(opts.file);
6156

6257
const version = {
6358
code: opts.code,

0 commit comments

Comments
 (0)